Spaces:
Runtime error
Runtime error
Download run_server.py from TheAbyss99/abyss-api: direct link, hf CLI and curl.
- Browser
- Download file 325 Bytes
-
https://huggingface.co/spaces/TheAbyss99/abyss-api/resolve/main/run_server.py
- Command line
-
hf download hf://spaces/TheAbyss99/abyss-api/run_server.py
-
curl -L -o run_server.py https://huggingface.co/spaces/TheAbyss99/abyss-api/resolve/main/run_server.py
325 Bytes
| import os | |
| import uvicorn | |
| if __name__ == "__main__": | |
| # Honor $PORT so the same entrypoint works locally (8000) and on | |
| # Hugging Face Spaces (7860, set in the Docker image / Space config). | |
| port = int(os.environ.get("PORT", "8000")) | |
| uvicorn.run("server.main:app", host="0.0.0.0", port=port, reload=False) |