File size: 653 Bytes
57ac4f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()