fix: align ML service labels with training order
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
59877bc17f
commit
ed8cecc3f5
@@ -44,6 +44,9 @@ async def predict(file: UploadFile = File(...)) -> PredictionResponse:
|
||||
except ImageDecodeError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
except Exception as exc:
|
||||
import logging
|
||||
|
||||
logging.exception("Prediction failed")
|
||||
raise HTTPException(status_code=500, detail="Prediction failed") from exc
|
||||
|
||||
return PredictionResponse(
|
||||
|
||||
Reference in New Issue
Block a user