Spaces:
Runtime error
Runtime error
Download request.py from JulienHalgand/hf-gradio-example: direct link, hf CLI and curl.
- Browser
- Download file 286 Bytes
-
https://huggingface.co/spaces/JulienHalgand/hf-gradio-example/resolve/main/request.py
- Command line
-
hf download hf://spaces/JulienHalgand/hf-gradio-example/request.py
-
curl -L -o request.py https://huggingface.co/spaces/JulienHalgand/hf-gradio-example/resolve/main/request.py
286 Bytes
| from gradio_client import Client, handle_file | |
| client = Client("http://127.0.0.1:7860/") | |
| #client = Client("JulienHalgand/hf-gradio-example") | |
| result = client.predict( | |
| file_path=handle_file('/home/julien/Downloads/La Marseillaise_1st_couplet.mp3'), | |
| api_name="/predict" | |
| ) | |
| print(result) |