Spaces:
Running
Running
Download run.py from GSMS-B/Contra-Signal: direct link, hf CLI and curl.
- Browser
- Download file 470 Bytes
-
https://huggingface.co/spaces/GSMS-B/Contra-Signal/resolve/main/run.py
- Command line
-
hf download hf://spaces/GSMS-B/Contra-Signal/run.py
-
curl -L -o run.py https://huggingface.co/spaces/GSMS-B/Contra-Signal/resolve/main/run.py
470 Bytes
| import uvicorn | |
| import os | |
| if __name__ == "__main__": | |
| # Render and other PaaS provide PORT via environment variable | |
| port = int(os.environ.get("PORT", 8000)) | |
| host = "0.0.0.0" | |
| # 0.0.0.0 is required for the app to be accessible externally (outside the container) | |
| if host == "0.0.0.0": | |
| print(f"\n🚀 App running! Access locally at: http://127.0.0.1:{port}\n") | |
| uvicorn.run("backend.main:app", host=host, port=port, log_level="info") | |