labels tresh hold
Browse files
app.py
CHANGED
|
@@ -43,7 +43,7 @@ async def predict(file: UploadFile = File(...)):
|
|
| 43 |
"label": labels[label_id],
|
| 44 |
"label_id": label_id,
|
| 45 |
"confidence": round(confidence, 2),
|
| 46 |
-
"threshold_check": "✅
|
| 47 |
}
|
| 48 |
|
| 49 |
# === Root Endpoint ===
|
|
|
|
| 43 |
"label": labels[label_id],
|
| 44 |
"label_id": label_id,
|
| 45 |
"confidence": round(confidence, 2),
|
| 46 |
+
"threshold_check": "✅ Gambar terdeteksi!" if confidence >= 60 else "Kurang yakin, coba lagi!",
|
| 47 |
}
|
| 48 |
|
| 49 |
# === Root Endpoint ===
|