fix: restore GET / root route (404 on HF Spaces health check)
Browse files
app.py
CHANGED
|
@@ -173,6 +173,11 @@ def _generate(input_ids: torch.Tensor, req, streamer=None) -> torch.Tensor:
|
|
| 173 |
# ---------------------------------------------------------------------------
|
| 174 |
# Routes
|
| 175 |
# ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
@app.get("/health")
|
| 177 |
def health():
|
| 178 |
return {
|
|
|
|
| 173 |
# ---------------------------------------------------------------------------
|
| 174 |
# Routes
|
| 175 |
# ---------------------------------------------------------------------------
|
| 176 |
+
@app.get("/")
|
| 177 |
+
def root():
|
| 178 |
+
return {"status": "ok", "model": MODEL_ID, "ready": _model_ready}
|
| 179 |
+
|
| 180 |
+
|
| 181 |
@app.get("/health")
|
| 182 |
def health():
|
| 183 |
return {
|