Vvaann commited on
Commit
191feea
·
verified ·
1 Parent(s): aa6b141

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -91,16 +91,17 @@ demo = gr.Interface(
91
  gr.Number(value=3, maximum=10, minimum=1,step=1.0, precision=0,label="Number of classes to display"),
92
  gr.Checkbox(True,label="Show GradCAM Image"),
93
  gr.Dropdown(model_layer_names, value="layer3_x", label="Which layer for Gradcam"),
94
- gr.Slider(0,1,value=0.5,label="Overall opacity of the overelay"),
95
  ],
96
  outputs = [
97
- gr.Image(width= 256, height=256,label="Output"),
98
- gr.Label(label="Confidences", container=True, show_label= True)
 
99
  ],
100
  title = "CIFAR 10 trained on ResNet model in pytorch lightning with Gradcam",
101
  description = " A simple gradio inference to infer on resnet18 model",
102
  examples = [["cat.jpg", 10, True, "layer3_x", -1],
103
- ["dog.jpg", 4, False, "layer3_x", -1]]
104
  )
105
 
106
  if __name__ == "__main__":
 
91
  gr.Number(value=3, maximum=10, minimum=1,step=1.0, precision=0,label="Number of classes to display"),
92
  gr.Checkbox(True,label="Show GradCAM Image"),
93
  gr.Dropdown(model_layer_names, value="layer3_x", label="Which layer for Gradcam"),
94
+ gr.Slider(0,1,value=0.5,label="Overall opacity of the overlay"),
95
  ],
96
  outputs = [
97
+ gr.Label(label="Class", container=True, show_label= True),
98
+ gr.Image(width= 256, height=256,label="Output Image"),
99
+ gr.Label(label="Confidences", container=True, show_label= True),
100
  ],
101
  title = "CIFAR 10 trained on ResNet model in pytorch lightning with Gradcam",
102
  description = " A simple gradio inference to infer on resnet18 model",
103
  examples = [["cat.jpg", 10, True, "layer3_x", -1],
104
+ ["dog.jpg", 4, False, "layer2_x", -1]]
105
  )
106
 
107
  if __name__ == "__main__":