Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def predict(path):
|
|
48 |
scores = mx.ndarray.softmax(mod.get_outputs()[0]).asnumpy()
|
49 |
# print the top-5 inferences class
|
50 |
scores = np.squeeze(scores)
|
51 |
-
a = np.argsort(scores)[
|
52 |
results = {}
|
53 |
for i in a[0:5]:
|
54 |
results[labels[i]] = float(scores[i])
|
|
|
48 |
scores = mx.ndarray.softmax(mod.get_outputs()[0]).asnumpy()
|
49 |
# print the top-5 inferences class
|
50 |
scores = np.squeeze(scores)
|
51 |
+
a = np.argsort(scores)[::1]
|
52 |
results = {}
|
53 |
for i in a[0:5]:
|
54 |
results[labels[i]] = float(scores[i])
|