akhaliq HF Staff commited on
Commit
2a59f7d
·
1 Parent(s): 640fb8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)[::1]
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)
52
  results = {}
53
  for i in a[0:5]:
54
  results[labels[i]] = float(scores[i])