coderx7 commited on
Commit
5b54b50
·
verified ·
1 Parent(s): 30539f3

fix gradio input/output issue

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,8 +51,8 @@ def inference(input_image):
51
  result[categories[top5_catid[i]]] = top5_prob[i].item()
52
  return result
53
 
54
- inputs = gr.inputs.Image(type='pil')
55
- outputs = gr.outputs.Label(type="confidences",num_top_classes=5)
56
 
57
  title = "SimpleNet"
58
  description = "Gradio demo for SimpleNet network pre-trained on ImageNet. This demo uses the simplenet_5m_m1 variant. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
 
51
  result[categories[top5_catid[i]]] = top5_prob[i].item()
52
  return result
53
 
54
+ inputs = gr.Image(type='pil')
55
+ outputs = gr.Label(type="confidences",num_top_classes=5)
56
 
57
  title = "SimpleNet"
58
  description = "Gradio demo for SimpleNet network pre-trained on ImageNet. This demo uses the simplenet_5m_m1 variant. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."