hysts HF staff commited on
Commit
76221dd
·
1 Parent(s): 82d201f
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -90,7 +90,7 @@ def predict(image: PIL.Image.Image, score_threshold: float,
90
  preds = preds.cpu().numpy().astype(float)
91
 
92
  res = dict()
93
- for prob, label in zip(preds, labels):
94
  if prob < score_threshold:
95
  continue
96
  res[label] = prob
 
90
  preds = preds.cpu().numpy().astype(float)
91
 
92
  res = dict()
93
+ for prob, label in zip(preds.tolist(), labels):
94
  if prob < score_threshold:
95
  continue
96
  res[label] = prob