akhaliq HF Staff commited on
Commit
83d9955
·
1 Parent(s): e8589e5

Update app.py

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