Spaces:
Sleeping
Sleeping
Download backend/main.py from saiteja020/PowerGrid: direct link, hf CLI and curl.
- Browser
- Download file 434 Bytes
-
https://huggingface.co/spaces/saiteja020/PowerGrid/resolve/main/backend/main.py
- Command line
-
hf download hf://spaces/saiteja020/PowerGrid/backend/main.py
-
curl -L -o main.py https://huggingface.co/spaces/saiteja020/PowerGrid/resolve/main/backend/main.py
434 Bytes
| import os | |
| import sys | |
| # Ensure project root (/app in Docker, the repo root locally) is on sys.path | |
| _ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) | |
| if _ROOT not in sys.path: | |
| sys.path.insert(0, _ROOT) | |
| import uvicorn | |
| if __name__ == "__main__": | |
| uvicorn.run( | |
| "server.app:app", | |
| host="0.0.0.0", | |
| port=int(os.getenv("PORT", 8000)), | |
| reload=False, | |
| log_level="info", | |
| ) | |