czkaiweb commited on
Commit
05e6243
1 Parent(s): d8a104d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -61,7 +61,7 @@ def inference(input_image):
61
  top5_prob, top5_catid = torch.topk(probabilities, 6)
62
  result = {}
63
  for i in range(top5_prob.size(0)):
64
- result[categories[top5_catid[i],item()]] = top5_prob[i].item()
65
  return result
66
 
67
  inputs = gr.Image(type='pil')
 
61
  top5_prob, top5_catid = torch.topk(probabilities, 6)
62
  result = {}
63
  for i in range(top5_prob.size(0)):
64
+ result[categories[top5_catid[i].item()]] = top5_prob[i].item()
65
  return result
66
 
67
  inputs = gr.Image(type='pil')