Spaces:
Runtime error
Runtime error
File size: 628 Bytes
474e88e 1c04df8 474e88e 1c04df8 474e88e 1c04df8 474e88e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import gradio as gr
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
# Load ModelScope's Text-to-Video Model
video_model = pipeline(Tasks.text_to_video_synthesis, model='damo/text-to-video-synthesis')
def generate_video(prompt):
result = video_model({'text': prompt})
return result["output_video"]
# Gradio UI
iface = gr.Interface(
fn=generate_video,
inputs=gr.Textbox(label="Enter text prompt"),
outputs=gr.Video(label="Generated Video"),
title="AI Text-to-Video Generator",
description="Type a prompt, and AI will create a video for you!",
)
iface.launch()
|