training / app.py
burtenshaw's picture
burtenshaw HF Staff
feat: secure metrics ingestion (#1)
7f556c1
Raw History Blame Contribute Delete
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")),
)