Spaces:
Sleeping
Sleeping
Download api/main.py from Egeekle/MLOps-risk-model: direct link, hf CLI and curl.
- Browser
- Download file 477 Bytes
-
https://huggingface.co/spaces/Egeekle/MLOps-risk-model/resolve/main/api/main.py
- Command line
-
hf download hf://spaces/Egeekle/MLOps-risk-model/api/main.py
-
curl -L -o main.py https://huggingface.co/spaces/Egeekle/MLOps-risk-model/resolve/main/api/main.py
477 Bytes
| # en api/main.py | |
| from fastapi import FastAPI | |
| from fastapi.responses import RedirectResponse | |
| from .config import API_TITLE, API_VERSION | |
| from .routes import api_router | |
| def create_app() -> FastAPI: | |
| app = FastAPI( | |
| title=API_TITLE, | |
| version=API_VERSION, | |
| ) | |
| def root(): | |
| return RedirectResponse(url="/docs") | |
| app.include_router(api_router) | |
| return app | |
| app = create_app() | |