Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def inference(input_image):
|
|
42 |
result[categories[top5_catid[i]]] = top5_prob[i].item()
|
43 |
return result
|
44 |
|
45 |
-
inputs = gr.
|
46 |
-
outputs = gr.
|
47 |
|
48 |
title = "ALEXNET"
|
49 |
description = "Gradio demo for Alexnet, the 2012 ImageNet winner achieved a top-5 error of 15.3%, more than 10.8 percentage points lower than that of the runner up. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
|
|
42 |
result[categories[top5_catid[i]]] = top5_prob[i].item()
|
43 |
return result
|
44 |
|
45 |
+
inputs = gr.components.Image(type='pil')
|
46 |
+
outputs = gr.components.Label(type="confidences",num_top_classes=5)
|
47 |
|
48 |
title = "ALEXNET"
|
49 |
description = "Gradio demo for Alexnet, the 2012 ImageNet winner achieved a top-5 error of 15.3%, more than 10.8 percentage points lower than that of the runner up. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|