Spaces:
Sleeping
Sleeping
Download main.py from Alpha-Team/CyberArena: direct link, hf CLI and curl.
- Browser
- Download file 667 Bytes
-
https://huggingface.co/spaces/Alpha-Team/CyberArena/resolve/main/main.py
- Command line
-
hf download hf://spaces/Alpha-Team/CyberArena/main.py
-
curl -L -o main.py https://huggingface.co/spaces/Alpha-Team/CyberArena/resolve/main/main.py
667 Bytes
| """Top-level entry point. | |
| Run with: | |
| python main.py | |
| The real FastAPI app lives in :mod:`app.main`; this file is just the | |
| thin launcher uvicorn needs to bind to the configured port. | |
| """ | |
| import os | |
| # Load .env explicitly so the launch banner prints even if the | |
| # worker is invoked via ``uvicorn main:app`` (which doesn't go | |
| # through ``app.main``'s own ``load_app_env`` call first). | |
| from app._env import load_app_env # noqa: E402 | |
| load_app_env() | |
| import uvicorn | |
| from app.main import app # noqa: F401 (re-exported for `uvicorn main:app`) | |
| if __name__ == "__main__": | |
| port = int(os.environ.get("PORT", 8090)) | |
| uvicorn.run(app, host="0.0.0.0", port=port) | |