Spaces:
Runtime error
Runtime error
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() | |