Download app.py from gbsim/test: direct link, hf CLI and curl.
- Browser
- Download file 398 Bytes
-
https://huggingface.co/spaces/gbsim/test/resolve/main/app.py
- Command line
-
hf download hf://spaces/gbsim/test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/gbsim/test/resolve/main/app.py
398 Bytes
| import os | |
| import gradio as gr | |
| def test(txt, vid): | |
| if txt: | |
| return "./world.mp4" | |
| elif vid: | |
| return vid | |
| # iface = gr.Interface(fn=test, inputs=["text", "video"], outputs="text", examples=["test", os.path.join(os.path.dirname(__file__), 'sample.mp4')]) | |
| iface = gr.Interface(fn=test, inputs=["text", "video"], outputs=["video"]) | |
| iface.queue(max_size=2) | |
| iface.launch(share=True) | |