Spaces:
Sleeping
Sleeping
File size: 924 Bytes
155306f 9f801a7 689e59c 155306f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | import gradio as gr
from transformers import pipeline
# Dictionary of available models
MODELS = {
"ModelScope (Text-to-Video)": "damo-vilab/modelscope-text-to-video-synthesis",
"Hunyuan (if available)": "TencentARC/HunyuanVideo-I2V",
"Mochi (Genmo)": "genmo/Mochi1",
"Wan1.2": "Wan-AI/Wan2.1-T2V-14B"
}
def generate_video(prompt, model_name):
try:
pipe = pipeline("text-to-video", model=MODELS[model_name])
output = pipe(prompt)
return output["video"]
except Exception as e:
return f"Error: {e}"
demo = gr.Interface(
fn=generate_video,
inputs=[
gr.Textbox(label="Prompt"),
gr.Dropdown(choices=list(MODELS.keys()), label="Choose Model")
],
outputs="video",
title="Text-to-Video Benchmarking Suite",
description="Test prompt alignment, motion quality, and therapeutic video generation across multiple models"
)
demo.launch() |