gen_video / app.py
speedartificialintelligence1122's picture
Create app.py
57ac4f7 verified
raw
history blame contribute delete
653 Bytes
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()