import gradio as gr import torch import torchvision def generate(prompt: str): video = torch.rand(240, 512, 512, 3) torchvision.io.write_video(video, "video.mp4", fps=24) return "video.mp4" gr.Interface( fn=generate, inputs="text", outputs=gr.Video() ).launch()