hysts HF staff commited on
Commit
18988d2
1 Parent(s): 7d33762
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -82,7 +82,7 @@ def predict(image: PIL.Image.Image, score_threshold: float,
82
  probs = model.predict(image[None, ...])[0]
83
  probs = probs.astype(float)
84
  res = dict()
85
- for prob, label in zip(probs, labels):
86
  if prob < score_threshold:
87
  continue
88
  res[label] = prob
 
82
  probs = model.predict(image[None, ...])[0]
83
  probs = probs.astype(float)
84
  res = dict()
85
+ for prob, label in zip(probs.tolist(), labels):
86
  if prob < score_threshold:
87
  continue
88
  res[label] = prob