From 40d0fd72f8f5813ecc65675760a8d682092d0f7f Mon Sep 17 00:00:00 2001 From: Flook Date: Fri, 14 Nov 2025 05:28:40 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9E=E0=B8=B1=E0=B8=92=E0=B8=99=E0=B8=B2?= =?UTF-8?q?=20Backend=20(=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=20H?= =?UTF-8?q?ealth=20Check=20Endpoint)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai-medical/app.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ai-medical/app.py b/ai-medical/app.py index 337f07d..9c2a9ef 100644 --- a/ai-medical/app.py +++ b/ai-medical/app.py @@ -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." - } \ No newline at end of file + } + +@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} \ No newline at end of file