Spaces:
Running
Running
File size: 630 Bytes
6946514 27435c3 6946514 27435c3 6946514 27435c3 6946514 27435c3 43afb20 6946514 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import gradio as gr
from diffusers import DiffusionPipeline
# Load the model
pipeline = DiffusionPipeline.from_pretrained("ali-vilab/text-to-video-ms-1.7b")
def generate_video(text):
video = pipeline(text)
# Assuming the output is a video file or a binary stream. Adjust accordingly.
return video
# Create the Gradio interface
interface = gr.Interface(
fn=generate_video,
inputs=gr.Textbox(lines=2, placeholder="Type your text here..."),
outputs=gr.Video(),
title="Text-to-Video Generator",
description="Enter some text and generate a video!"
)
if __name__ == "__main__":
interface.launch() |