Download app.py from sushann222/cloneImagetoVideo: direct link, hf CLI and curl.
- Browser
- Download file 630 Bytes
-
https://huggingface.co/sushann222/cloneImagetoVideo/resolve/main/app.py
- Command line
-
hf download hf://sushann222/cloneImagetoVideo/app.py
-
curl -L -o app.py https://huggingface.co/sushann222/cloneImagetoVideo/resolve/main/app.py
630 Bytes
| import gradio as gr | |
| from infer import generate_video | |
| def gradio_generate_video(image, elevation=10): | |
| image_path = image.name # Save the image to a temporary file | |
| image.save(image_path) # Save uploaded image to disk | |
| output_gif = generate_video(image_path=image_path, output_dir="out/", elevation=elevation) | |
| return output_gif # Return the generated video path | |
| iface = gr.Interface( | |
| fn=gradio_generate_video, | |
| inputs=[ | |
| gr.inputs.Image(type="filepath"), | |
| gr.inputs.Slider(minimum=0, maximum=90, default=10, label="Camera Elevation"), | |
| ], | |
| outputs=gr.outputs.Video(), | |
| ) | |
| iface.launch() | |