github-actions[bot] commited on
Commit ·
6e3355f
1
Parent(s): 3509487
🚀 Deploy from GitHub Actions - 2026-02-09 14:17:47
Browse files
app.py
CHANGED
|
@@ -337,7 +337,10 @@ async def predict_emotion(file: UploadFile = File(...)):
|
|
| 337 |
|
| 338 |
# 3. Inference ONNX
|
| 339 |
outputs = onnx_session.run(['output'], {'input': input_tensor})
|
| 340 |
-
scores_array = outputs[0][0]
|
|
|
|
|
|
|
|
|
|
| 341 |
|
| 342 |
# 4. Format résultats
|
| 343 |
return PredictionResponse(
|
|
|
|
| 337 |
|
| 338 |
# 3. Inference ONNX
|
| 339 |
outputs = onnx_session.run(['output'], {'input': input_tensor})
|
| 340 |
+
# scores_array = outputs[0][0]
|
| 341 |
+
logits = outputs[0][0]
|
| 342 |
+
probs = np.exp(logits) / np.sum(np.exp(logits))
|
| 343 |
+
scores_array = probs
|
| 344 |
|
| 345 |
# 4. Format résultats
|
| 346 |
return PredictionResponse(
|