Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,6 @@ demo = gr.Interface(
|
|
92 |
gr.Slider(minimum=0.1, maximum=1.0, step=0.1, default=0.5, label="Opacity"),
|
93 |
gr.Radio(["Yes", "No"], label="View misclassified images?"),
|
94 |
gr.Number(label="Number of misclassified images to view", default=5, min=1, max=10),
|
95 |
-
gr.Radio(["Upload New Images", "Example Images"], label="Select images source"),
|
96 |
gr.Image(shape=(32, 32), label="Input Image" if "Interface" in gr.__file__ else "Image"),
|
97 |
gr.Button(label="Submit", type="boolean"),
|
98 |
# gr.Image(shape=(32, 32), label="Input Image"),
|
@@ -108,7 +107,7 @@ demo = gr.Interface(
|
|
108 |
# Callback function for the Gradio interface
|
109 |
def gradio_callback(view_gradcam, num_gradcam_images, layer_name, opacity,
|
110 |
view_misclassified, num_misclassified_images,
|
111 |
-
|
112 |
confidence = inference_confidences(input_img, transparency = 0.5, target_layer_number = -1)
|
113 |
visualization = inference_visualization(input_img, transparency = 0.5, target_layer_number = -1)
|
114 |
return confidence, visualization
|
|
|
92 |
gr.Slider(minimum=0.1, maximum=1.0, step=0.1, default=0.5, label="Opacity"),
|
93 |
gr.Radio(["Yes", "No"], label="View misclassified images?"),
|
94 |
gr.Number(label="Number of misclassified images to view", default=5, min=1, max=10),
|
|
|
95 |
gr.Image(shape=(32, 32), label="Input Image" if "Interface" in gr.__file__ else "Image"),
|
96 |
gr.Button(label="Submit", type="boolean"),
|
97 |
# gr.Image(shape=(32, 32), label="Input Image"),
|
|
|
107 |
# Callback function for the Gradio interface
|
108 |
def gradio_callback(view_gradcam, num_gradcam_images, layer_name, opacity,
|
109 |
view_misclassified, num_misclassified_images,
|
110 |
+
input_img):
|
111 |
confidence = inference_confidences(input_img, transparency = 0.5, target_layer_number = -1)
|
112 |
visualization = inference_visualization(input_img, transparency = 0.5, target_layer_number = -1)
|
113 |
return confidence, visualization
|