Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def predict_top_classes(img, model_name):
|
|
36 |
temp = model.predict(x)
|
37 |
|
38 |
idx = np.argsort(np.squeeze(temp))[::-1]
|
39 |
-
top5_value = np.asarray([temp[0][i] for i in idx[0:5])
|
40 |
top5_idx = idx[0:5]
|
41 |
|
42 |
return {CLASS_LABEL[i]: str(v) for i, v in zip(top5_idx, top5_value)}
|
|
|
36 |
temp = model.predict(x)
|
37 |
|
38 |
idx = np.argsort(np.squeeze(temp))[::-1]
|
39 |
+
top5_value = np.asarray([temp[0][i] for i in idx[0:5]])
|
40 |
top5_idx = idx[0:5]
|
41 |
|
42 |
return {CLASS_LABEL[i]: str(v) for i, v in zip(top5_idx, top5_value)}
|