Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|
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=
|
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 |
|