Harshith Reddy
commited on
Commit
·
ae91ef9
1
Parent(s):
951621e
Fix API route paths - remove duplicate /api prefix
Browse files
app.py
CHANGED
|
@@ -426,13 +426,13 @@ async def root():
|
|
| 426 |
"message": "SRMA-Mamba Liver Segmentation API",
|
| 427 |
"version": "1.0.0",
|
| 428 |
"endpoints": {
|
| 429 |
-
"/
|
| 430 |
-
"/
|
| 431 |
"/docs": "API documentation"
|
| 432 |
}
|
| 433 |
}
|
| 434 |
|
| 435 |
-
@api_app.get("/
|
| 436 |
async def health_check():
|
| 437 |
return {
|
| 438 |
"status": "healthy",
|
|
@@ -441,7 +441,7 @@ async def health_check():
|
|
| 441 |
"model_t2_loaded": MODEL_T2 is not None
|
| 442 |
}
|
| 443 |
|
| 444 |
-
@api_app.post("/
|
| 445 |
async def segment_liver(
|
| 446 |
file: UploadFile = File(...),
|
| 447 |
modality: str = Form("T1"),
|
|
|
|
| 426 |
"message": "SRMA-Mamba Liver Segmentation API",
|
| 427 |
"version": "1.0.0",
|
| 428 |
"endpoints": {
|
| 429 |
+
"/segment": "POST - Upload NIfTI file for segmentation",
|
| 430 |
+
"/health": "GET - Health check",
|
| 431 |
"/docs": "API documentation"
|
| 432 |
}
|
| 433 |
}
|
| 434 |
|
| 435 |
+
@api_app.get("/health")
|
| 436 |
async def health_check():
|
| 437 |
return {
|
| 438 |
"status": "healthy",
|
|
|
|
| 441 |
"model_t2_loaded": MODEL_T2 is not None
|
| 442 |
}
|
| 443 |
|
| 444 |
+
@api_app.post("/segment")
|
| 445 |
async def segment_liver(
|
| 446 |
file: UploadFile = File(...),
|
| 447 |
modality: str = Form("T1"),
|