Codex commited on
Commit ·
6a290f8
1
Parent(s): 0af2179
Deploy SQuADDS ML inference API
Browse files- deployment_manifest.json +1 -1
- squadds_ml_api/api.py +5 -0
deployment_manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"generated_at": "2026-04-10T23:
|
| 3 |
"space": {
|
| 4 |
"repo_id": "SQuADDS/squadds-ml-inference-api",
|
| 5 |
"title": "SQuADDS ML Inference API",
|
|
|
|
| 1 |
{
|
| 2 |
+
"generated_at": "2026-04-10T23:39:12.989138+00:00",
|
| 3 |
"space": {
|
| 4 |
"repo_id": "SQuADDS/squadds-ml-inference-api",
|
| 5 |
"title": "SQuADDS ML Inference API",
|
squadds_ml_api/api.py
CHANGED
|
@@ -51,6 +51,11 @@ def create_app(bundle_root: Path) -> FastAPI:
|
|
| 51 |
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
| 52 |
except BundleConfigError as exc:
|
| 53 |
raise HTTPException(status_code=500, detail=str(exc)) from exc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
return payload
|
| 55 |
|
| 56 |
return app
|
|
|
|
| 51 |
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
| 52 |
except BundleConfigError as exc:
|
| 53 |
raise HTTPException(status_code=500, detail=str(exc)) from exc
|
| 54 |
+
except Exception as exc:
|
| 55 |
+
raise HTTPException(
|
| 56 |
+
status_code=500,
|
| 57 |
+
detail=f"Unexpected inference error for model '{request.model_id}': {exc}",
|
| 58 |
+
) from exc
|
| 59 |
return payload
|
| 60 |
|
| 61 |
return app
|