Commit Β·
c701395
1
Parent(s): 39f60ed
fix: add root endpoint for HF Spaces health probe
Browse files- app/api/routes.py +8 -0
app/api/routes.py
CHANGED
|
@@ -27,6 +27,14 @@ logger = logging.getLogger(__name__)
|
|
| 27 |
router = APIRouter()
|
| 28 |
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
# ββ Health check ββ
|
| 31 |
|
| 32 |
@router.get("/health", response_model=HealthResponse, tags=["system"])
|
|
|
|
| 27 |
router = APIRouter()
|
| 28 |
|
| 29 |
|
| 30 |
+
# ββ Root / HF health probe ββ
|
| 31 |
+
|
| 32 |
+
@router.get("/", tags=["system"])
|
| 33 |
+
async def root():
|
| 34 |
+
"""Root endpoint β HF Spaces probes this URL for health checks."""
|
| 35 |
+
return {"status": "ok"}
|
| 36 |
+
|
| 37 |
+
|
| 38 |
# ββ Health check ββ
|
| 39 |
|
| 40 |
@router.get("/health", response_model=HealthResponse, tags=["system"])
|