Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from modelscope.pipelines import pipeline | |
| from modelscope.utils.constant import Tasks | |
| # Load the video generation pipeline | |
| video_pipe = pipeline(Tasks.text_to_video_synthesis, model='damo/text-to-video-synthesis') | |
| def generate_video(prompt): | |
| result = video_pipe({'text': prompt}) | |
| return result['output_video'] | |
| gr.Interface(fn=generate_video, | |
| inputs=gr.Textbox(label="Enter your scene (text prompt)"), | |
| outputs=gr.Video(label="Generated Video"), | |
| title="Speed Video Generator π₯", | |
| description="Turn your imagination into video. Powered by ModelScope T2V π" | |
| ).launch() | |