Spaces:
Running
Running
Download app.py from openenvarena/training: direct link, hf CLI and curl.
- Browser
- Download file 551 Bytes
-
https://huggingface.co/spaces/openenvarena/training/resolve/main/app.py
- Command line
-
hf download hf://spaces/openenvarena/training/app.py
-
curl -L -o app.py https://huggingface.co/spaces/openenvarena/training/resolve/main/app.py
551 Bytes
| import os | |
| import uvicorn | |
| from starlette.routing import Route | |
| from trackio.server import build_starlette_app_only | |
| from ingest import ingest | |
| def create_app(): | |
| # Keep Trackio's dashboard, authentication and mounted bucket configuration. | |
| app, _ = build_starlette_app_only(mcp_server=False) | |
| app.router.routes.insert(0, Route("/ingest", ingest, methods=["POST"])) | |
| return app | |
| if __name__ == "__main__": | |
| uvicorn.run( | |
| create_app(), | |
| host="0.0.0.0", | |
| port=int(os.environ.get("GRADIO_SERVER_PORT", "7860")), | |
| ) | |