Download app.py from julius119/VerseFlow-Studio: direct link, hf CLI and curl.
- Browser
- Download file 1.88 kB
-
https://huggingface.co/julius119/VerseFlow-Studio/resolve/main/app.py
- Command line
-
hf download hf://julius119/VerseFlow-Studio/app.py
-
curl -L -o app.py https://huggingface.co/julius119/VerseFlow-Studio/resolve/main/app.py
1.88 kB
| """ | |
| VerseFlow Studio v5.0 - Hugging Face Gradio Demo | |
| Author: XiaoZhe (Commercial Contact: janejulius119@gmail.com / WeChat: julius119) | |
| """ | |
| import gradio as gr | |
| import time | |
| def generate_ai_video(prompt, scene_type, quality_tier): | |
| time.sleep(1) | |
| return f"VerseFlow v5.0 任务已就绪! 模式: {scene_type}, 质量: {quality_tier}", "作者: XiaoZhe (julius119)" | |
| with gr.Blocks(title="VerseFlow Studio v5.0 Demo") as demo: | |
| gr.Markdown("# 🎬 VerseFlow Studio v5.0 AI 视频操作系统\n### 开发者:XiaoZhe (XiaoZhe AIGC工作室)\n**联系**: janejulius119@gmail.com / WeChat: julius119") | |
| with gr.Row(): | |
| with gr.Column(): | |
| prompt_input = gr.Textbox(label="Prompt") | |
| scene_dropdown = gr.Dropdown(["product_demo", "talking_head"], label="场景", value="product_demo") | |
| tier_dropdown = gr.Radio(["draft", "standard", "premium"], label="质量", value="standard") | |
| submit_btn = gr.Button("🚀 提交任务", variant="primary") | |
| with gr.Column(): | |
| status_output = gr.Textbox(label="日志") | |
| author_notice = gr.Textbox(label="声明") | |
| submit_btn.click(fn=generate_ai_video, inputs=[prompt_input, scene_dropdown, tier_dropdown], outputs=[status_output, author_notice]) | |
| demo.queue().launch() | |
| import gradio as gr | |
| from transformers import pipeline | |
| pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog") | |
| def predict(input_img): | |
| predictions = pipeline(input_img) | |
| return input_img, {p["label"]: p["score"] for p in predictions} | |
| gradio_app = gr.Interface( | |
| predict, | |
| inputs=gr.Image(label="Select hot dog candidate", sources=['upload', 'webcam'], type="pil"), | |
| outputs=[gr.Image(label="Processed Image"), gr.Label(label="Result", num_top_classes=2)], | |
| title="Hot Dog? Or Not?", | |
| ) | |
| if __name__ == "__main__": | |
| gradio_app.launch() |