Spaces:
Running on Zero
Running on Zero
Download app.py from codemichaeld/py_new: direct link, hf CLI and curl.
- Browser
- Download file 543 Bytes
-
https://huggingface.co/spaces/codemichaeld/py_new/resolve/main/app.py
- Command line
-
hf download hf://spaces/codemichaeld/py_new/app.py
-
curl -L -o app.py https://huggingface.co/spaces/codemichaeld/py_new/resolve/main/app.py
543 Bytes
| import gradio as gr | |
| import spaces | |
| # Dummy function for ZeroGPU boot validation (keep it) | |
| def fix_startup_check(): | |
| """Dummy function to pass HF ZeroGPU boot validation.""" | |
| return None | |
| # Your actual app code | |
| def say_hello(name: str) -> str: | |
| return f"Hello {name}!" | |
| demo = gr.Interface( | |
| fn=say_hello, | |
| inputs="text", | |
| outputs="text", | |
| api_name="say_hello" # explicit endpoint name (optional) | |
| ) | |
| # IMPORTANT: bind to 0.0.0.0 so zrok can forward traffic | |
| demo.launch(server_name="0.0.0.0", server_port=7860) |