Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,11 +88,11 @@ def inference(input_img, show_gradcam, layer_name, num_classes, transparancy = 0
|
|
| 88 |
demo = gr.Interface(
|
| 89 |
inference,
|
| 90 |
inputs = [
|
| 91 |
-
gr.Image(width=256,height=256,label="
|
| 92 |
gr.Number(value=3, maximum=10, minimum=1,step=1.0, precision=0,label="Number of classes to display"),
|
| 93 |
-
gr.Checkbox(True,label="Show GradCAM Image"),
|
| 94 |
gr.Dropdown(model_layer_names, value="3", label="Which layer for Gradcam"),
|
| 95 |
-
gr.Slider(0,1,value=0.5,label="Overall opacity of the overlay"),
|
| 96 |
],
|
| 97 |
outputs = [
|
| 98 |
gr.Label(label="Class", container=True, show_label= True),
|
|
@@ -101,7 +101,7 @@ demo = gr.Interface(
|
|
| 101 |
],
|
| 102 |
title = "CIFAR 10 trained on ResNet model in pytorch lightning with Gradcam",
|
| 103 |
description = " A simple gradio inference to infer on resnet18 model",
|
| 104 |
-
examples = [["cat.jpg",
|
| 105 |
["dog.jpg", 4, False, "1", -1]]
|
| 106 |
)
|
| 107 |
|
|
|
|
| 88 |
demo = gr.Interface(
|
| 89 |
inference,
|
| 90 |
inputs = [
|
| 91 |
+
gr.Image(width=256,height=256,label="Input image"),
|
| 92 |
gr.Number(value=3, maximum=10, minimum=1,step=1.0, precision=0,label="Number of classes to display"),
|
| 93 |
+
gr.Checkbox(True, label="Show GradCAM Image"),
|
| 94 |
gr.Dropdown(model_layer_names, value="3", label="Which layer for Gradcam"),
|
| 95 |
+
gr.Slider(0, 1, value=0.5,label="Overall opacity of the overlay"),
|
| 96 |
],
|
| 97 |
outputs = [
|
| 98 |
gr.Label(label="Class", container=True, show_label= True),
|
|
|
|
| 101 |
],
|
| 102 |
title = "CIFAR 10 trained on ResNet model in pytorch lightning with Gradcam",
|
| 103 |
description = " A simple gradio inference to infer on resnet18 model",
|
| 104 |
+
examples = [["cat.jpg", True, 10, "1", -1],
|
| 105 |
["dog.jpg", 4, False, "1", -1]]
|
| 106 |
)
|
| 107 |
|