hysts HF staff commited on
Commit
7b24b7f
1 Parent(s): 7c92481
Files changed (1) hide show
  1. app.py +1 -1
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