| 1 | import gradio as gr |
| 2 | |
| 3 | |
| 4 | def infer(image, prompt, steps=6): |
| 5 | frames = pipe(image=image, prompt=prompt, num_inference_steps=steps).frames[0] |
| 6 | return export_to_video(frames, "out.mp4", fps=16) |
| 7 | |
| 8 | demo = gr.Interface(infer, [gr.Image(label="Input image"), gr.Textbox(label="Prompt")], gr.Video(label="Generated video"), title="Loop Maker") |
| 9 | |
| 10 | if __name__ == "__main__": |
| 11 | demo.launch() |