Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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]
|
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')
|