Update main.py
Browse files
main.py
CHANGED
|
@@ -219,7 +219,7 @@ app.add_middleware(
|
|
| 219 |
CORSMiddleware,
|
| 220 |
allow_origins=ALLOWED_ORIGINS,
|
| 221 |
allow_credentials=True,
|
| 222 |
-
allow_methods=["GET", "POST"],
|
| 223 |
allow_headers=["Content-Type", "Authorization"],
|
| 224 |
)
|
| 225 |
|
|
@@ -237,7 +237,7 @@ class PredictionResponse(BaseModel):
|
|
| 237 |
model_used: str = "KIBA"
|
| 238 |
|
| 239 |
|
| 240 |
-
@app.
|
| 241 |
async def health():
|
| 242 |
return {"status": "healthy", "model_loaded": state.model is not None, "device": str(state.device)}
|
| 243 |
|
|
|
|
| 219 |
CORSMiddleware,
|
| 220 |
allow_origins=ALLOWED_ORIGINS,
|
| 221 |
allow_credentials=True,
|
| 222 |
+
allow_methods=["GET", "POST", "HEAD"],
|
| 223 |
allow_headers=["Content-Type", "Authorization"],
|
| 224 |
)
|
| 225 |
|
|
|
|
| 237 |
model_used: str = "KIBA"
|
| 238 |
|
| 239 |
|
| 240 |
+
@app.head("/health")
|
| 241 |
async def health():
|
| 242 |
return {"status": "healthy", "model_loaded": state.model is not None, "device": str(state.device)}
|
| 243 |
|