akhaliq HF Staff commited on
Commit
0a0196c
·
1 Parent(s): de7e2ed

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)[::-5]
52
  results = {}
53
  for i in a[0:5]:
54
  results[labels[i]] = float(scores[i])