Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|