Spaces:
Build error
Build error
| import gradio as gr | |
| from text2video_zero import Text2VideoPipeline | |
| # Load the Text2Video-Zero model | |
| pipe = Text2VideoPipeline.from_pretrained("Picsart-AI-Research/Text2Video-Zero") | |
| def generate_video(prompt): | |
| video = pipe(prompt, num_frames=16, height=256, width=256) | |
| video.save("output.mp4") | |
| return "output.mp4" | |
| demo = gr.Interface( | |
| fn=generate_video, | |
| inputs=gr.Textbox(label="Enter prompt"), | |
| outputs=gr.Video(label="Generated Video") | |
| ) | |
| demo.launch() | |