AbdoIR commited on
Commit
5fb77dc
·
verified ·
1 Parent(s): 017bad6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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.get("/health")
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