fix: align Rust ML service verification
Corrected API response format documentation in README: - Health endpoint: removed non-existent model_path field - Metadata endpoint: fixed field names (service_name, service_version instead of service, version) and label order - Prediction endpoint: corrected response structure to match implementation (single prediction object with probabilities map, not array) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
86371a6e31
commit
e2e3addd66
+12
-26
@@ -97,8 +97,7 @@ curl http://localhost:8001/health
|
||||
```json
|
||||
{
|
||||
"status": "ok",
|
||||
"model_loaded": true,
|
||||
"model_path": "../../Machine_Learning/model/model.onnx"
|
||||
"model_loaded": true
|
||||
}
|
||||
```
|
||||
|
||||
@@ -117,15 +116,16 @@ curl http://localhost:8001/metadata
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"service": "ZeaVis ML Service",
|
||||
"version": "0.1.0",
|
||||
"service_name": "zeavis-ml-service",
|
||||
"service_version": "0.1.0",
|
||||
"model_path": "../../Machine_Learning/model/model.onnx",
|
||||
"model_loaded": true,
|
||||
"input_size": 224,
|
||||
"labels": [
|
||||
"Bercak Daun",
|
||||
"Hawar Daun",
|
||||
"Daun Sehat",
|
||||
"Karat Daun",
|
||||
"Daun Sehat"
|
||||
"Hawar Daun"
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -148,28 +148,14 @@ curl -X POST http://localhost:8001/predict \
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"predictions": [
|
||||
{
|
||||
"label": "Daun Sehat",
|
||||
"confidence": 0.95
|
||||
},
|
||||
{
|
||||
"label": "Bercak Daun",
|
||||
"confidence": 0.03
|
||||
},
|
||||
{
|
||||
"label": "Hawar Daun",
|
||||
"confidence": 0.01
|
||||
},
|
||||
{
|
||||
"label": "Karat Daun",
|
||||
"confidence": 0.01
|
||||
}
|
||||
],
|
||||
"top_prediction": {
|
||||
"label": "Daun Sehat",
|
||||
"confidence": 0.95
|
||||
"confidence": 0.95,
|
||||
"probabilities": {
|
||||
"Bercak Daun": 0.02,
|
||||
"Daun Sehat": 0.95,
|
||||
"Karat Daun": 0.01,
|
||||
"Hawar Daun": 0.02
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user