Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def inference_visualization(input_img, transparency = 0.5, target_layer_number =
|
|
78 |
# def gradio_callback(view_gradcam, num_gradcam_images, layer_name, opacity,
|
79 |
# view_misclassified, num_misclassified_images,
|
80 |
# input_img,submit):
|
81 |
-
def gradio_callback(
|
82 |
|
83 |
confidence = inference_confidences(input_img, transparency = 0.5, target_layer_number = -1)
|
84 |
visualization = inference_visualization(input_img, transparency = 0.5, target_layer_number = -1)
|
@@ -108,7 +108,8 @@ demo = gr.Interface(
|
|
108 |
# gr.Radio(["Yes", "No"], label="View misclassified images?"),
|
109 |
# gr.Number(label="Number of misclassified images to view", default=5, min=1, max=10),
|
110 |
# gr.Image(shape=(32, 32), label="Input Image")
|
111 |
-
gr.Radio(["Yes", "No"], label="View GradCAM images?"),
|
|
|
112 |
gr.Image(shape=(32, 32), label="Input Image"),
|
113 |
gr.Slider(0, 1, value = 0.5, label="Opacity of GradCAM"),
|
114 |
gr.Slider(-2, -1, value = -2, step=1, label="Which Layer?")
|
|
|
78 |
# def gradio_callback(view_gradcam, num_gradcam_images, layer_name, opacity,
|
79 |
# view_misclassified, num_misclassified_images,
|
80 |
# input_img,submit):
|
81 |
+
def gradio_callback(input_img, transparency = 0.5, target_layer_number = -1):
|
82 |
|
83 |
confidence = inference_confidences(input_img, transparency = 0.5, target_layer_number = -1)
|
84 |
visualization = inference_visualization(input_img, transparency = 0.5, target_layer_number = -1)
|
|
|
108 |
# gr.Radio(["Yes", "No"], label="View misclassified images?"),
|
109 |
# gr.Number(label="Number of misclassified images to view", default=5, min=1, max=10),
|
110 |
# gr.Image(shape=(32, 32), label="Input Image")
|
111 |
+
# gr.Radio(["Yes", "No"], label="View GradCAM images?"),
|
112 |
+
gr.Radio(["Yes", "No"], label="Location", info="GradCAM images?"),
|
113 |
gr.Image(shape=(32, 32), label="Input Image"),
|
114 |
gr.Slider(0, 1, value = 0.5, label="Opacity of GradCAM"),
|
115 |
gr.Slider(-2, -1, value = -2, step=1, label="Which Layer?")
|