fix gradio input/output issue
Browse files
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.
|
55 |
-
outputs = gr.
|
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."
|