Spaces:
Running
Running
Download api.py from helmfridsson/qa-agent-service: direct link, hf CLI and curl.
- Browser
- Download file 553 Bytes
-
https://huggingface.co/spaces/helmfridsson/qa-agent-service/resolve/main/api.py
- Command line
-
hf download hf://spaces/helmfridsson/qa-agent-service/api.py
-
curl -L -o api.py https://huggingface.co/spaces/helmfridsson/qa-agent-service/resolve/main/api.py
553 Bytes
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| SRC_PATH = Path(__file__).resolve().parent / "src" | |
| if SRC_PATH.exists(): | |
| sys.path.insert(0, str(SRC_PATH)) | |
| from fastapi import FastAPI | |
| from fastapi.responses import RedirectResponse | |
| from qa_agent_service.rest_routes import router | |
| app = FastAPI(title="QA Agent Service", version="0.1.0") | |
| app.include_router(router) | |
| app.include_router(router, prefix="/api/v1") | |
| def root() -> RedirectResponse: | |
| return RedirectResponse(url="/docs") | |