Spaces:
Runtime error
Runtime error
File size: 593 Bytes
5bdc58a 67ab414 5bdc58a |
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
import torch
from diffusers import TextToVideoPipeline
pipeline = TextToVideoPipeline.from_pretrained("Skywork/SkyReels-V2-DF-1.3B-540P", torch_dtype=torch.float16)
pipeline = pipeline.to("cuda")
def generate_video(prompt):
video_frames = pipeline(prompt, num_inference_steps=25).frames
return video_frames
interface = gr.Interface(
fn=generate_video,
inputs=gr.Textbox(lines=2, placeholder="Enter your prompt here..."),
outputs=gr.Video(),
title="Text to Video Generator",
description="Generate video from text prompt"
)
interface.launch()
|