Spaces:
Sleeping
Sleeping
Download app.py from vjlopezvilla/hf-test-api: direct link, hf CLI and curl.
- Browser
- Download file 281 Bytes
-
https://huggingface.co/spaces/vjlopezvilla/hf-test-api/resolve/main/app.py
- Command line
-
hf download hf://spaces/vjlopezvilla/hf-test-api/app.py
-
curl -L -o app.py https://huggingface.co/spaces/vjlopezvilla/hf-test-api/resolve/main/app.py
281 Bytes
| import gradio as gr | |
| def api(nombre): | |
| return { | |
| "status": "ok", | |
| "message": f"Hola {nombre}", | |
| "length": len(nombre) | |
| } | |
| demo = gr.Interface( | |
| fn=api, | |
| inputs=gr.Textbox(label="nombre"), | |
| outputs="json", | |
| title="HF Test API" | |
| ) | |
| demo.launch() |