Spaces:
Running
Running
Fix
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ def predict(image: PIL.Image.Image, score_threshold: float,
|
|
87 |
preds = preds.cpu().numpy().astype(float)
|
88 |
|
89 |
res = dict()
|
90 |
-
for prob, label in zip(preds, labels):
|
91 |
if prob < score_threshold:
|
92 |
continue
|
93 |
res[label] = prob
|
|
|
87 |
preds = preds.cpu().numpy().astype(float)
|
88 |
|
89 |
res = dict()
|
90 |
+
for prob, label in zip(preds.tolist(), labels):
|
91 |
if prob < score_threshold:
|
92 |
continue
|
93 |
res[label] = prob
|