fradinho commited on
Commit
0d61d3f
·
1 Parent(s): e70dbe2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -77,7 +77,7 @@ def predict_2(image):
77
 
78
  unpatched_prediction = unpatchify(patched_prediction, (image.shape[0], image.shape[1]))
79
  labels = LABEL_NAMES
80
- res = np.bincount(unpatched_prediction.reshape(-1))/unpatched_prediction.reshape(-1).shape[0]
81
  out = dict(list(zip(labels, res)))
82
  unpatched_prediction = targets_classes_colors[unpatched_prediction]
83
 
 
77
 
78
  unpatched_prediction = unpatchify(patched_prediction, (image.shape[0], image.shape[1]))
79
  labels = LABEL_NAMES
80
+ res = list(map(str, np.bincount(unpatched_prediction.reshape(-1))/unpatched_prediction.reshape(-1).shape[0]))
81
  out = dict(list(zip(labels, res)))
82
  unpatched_prediction = targets_classes_colors[unpatched_prediction]
83