พัฒนา Backend (เพิ่ม Health Check Endpoint)
This commit is contained in:
parent
02339b4fb6
commit
40d0fd72f8
@ -227,4 +227,10 @@ async def spleen_segmentation(file: UploadFile = File(...)):
|
||||
"diagnosis": diagnosis,
|
||||
"splenomegaly_threshold_cm3": SPLENOMEGALY_THRESHOLD_CM3,
|
||||
"message": "Segmentation, volume calculation using resampled spacing, and splenomegaly analysis complete."
|
||||
}
|
||||
}
|
||||
|
||||
@app.get("/inference/spleen/health")
|
||||
async def get_spleen_health():
|
||||
if model is None:
|
||||
raise HTTPException(status_code=503, detail="Model not initialized")
|
||||
return {"status": "Model Ready", "model_loaded": True}
|
||||
Loading…
x
Reference in New Issue
Block a user