yuhe6 commited on
Commit
b8aa0fe
·
1 Parent(s): e0d03bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -104,7 +104,7 @@ def inference(input_image):
104
 
105
  # Show top categories per image
106
 
107
- top1_prob, top1_catid = torch.topk(probabilities, 1)
108
 
109
  result = {}
110
 
@@ -118,7 +118,7 @@ def inference(input_image):
118
 
119
  inputs = gr.inputs.Image(type='pil')
120
 
121
- outputs = gr.outputs.Label(type="confidences",num_top_classes=1)
122
 
123
 
124
 
 
104
 
105
  # Show top categories per image
106
 
107
+ top1_prob, top1_catid = torch.topk(probabilities, 2)
108
 
109
  result = {}
110
 
 
118
 
119
  inputs = gr.inputs.Image(type='pil')
120
 
121
+ outputs = gr.outputs.Label(type="confidences",num_top_classes=2)
122
 
123
 
124