Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -196,6 +196,9 @@ def top_pct(preds, threshold=0.95):
|
|
| 196 |
cum_score += item["score"]
|
| 197 |
if cum_score >= threshold:
|
| 198 |
break
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
preds = preds[: (i + 1)]
|
| 201 |
|
|
|
|
| 196 |
cum_score += item["score"]
|
| 197 |
if cum_score >= threshold:
|
| 198 |
break
|
| 199 |
+
if item["score"] == 0:
|
| 200 |
+
i -= 1
|
| 201 |
+
break
|
| 202 |
|
| 203 |
preds = preds[: (i + 1)]
|
| 204 |
|