Spaces:
Runtime error
Runtime error
File size: 565 Bytes
474e88e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
from transformers import pipeline
# Load the text-to-video model (Example using ModelScope)
video_model = pipeline("text-to-video", model="damo-vilab/text-to-video-ms-1.7b")
def generate_video(prompt):
video = video_model(prompt)
return video["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()
|