Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 95 |
],
|
| 96 |
outputs = [
|
| 97 |
-
gr.
|
| 98 |
-
gr.
|
|
|
|
| 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, "
|
| 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__":
|