Spaces:
Sleeping
Sleeping
Commit ·
7c7cae5
1
Parent(s): fd8fc09
Add root endpoint for HF Spaces health check
Browse files- app/main.py +6 -0
app/main.py
CHANGED
|
@@ -97,6 +97,12 @@ app.add_middleware(
|
|
| 97 |
)
|
| 98 |
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
@app.get("/health")
|
| 101 |
async def health_check():
|
| 102 |
"""
|
|
|
|
| 97 |
)
|
| 98 |
|
| 99 |
|
| 100 |
+
@app.get("/")
|
| 101 |
+
async def root():
|
| 102 |
+
"""Root endpoint — confirms the service is running."""
|
| 103 |
+
return {"status": "ok", "service": "Ninja Code Guard", "docs": "/health"}
|
| 104 |
+
|
| 105 |
+
|
| 106 |
@app.get("/health")
|
| 107 |
async def health_check():
|
| 108 |
"""
|