origing=upper
Browse files
app.py
CHANGED
@@ -112,8 +112,6 @@ def plot_activations(activation_1: list, activation_2: list, origin='lower'):
|
|
112 |
|
113 |
ax1, ax2 = axs[0], axs[1]
|
114 |
|
115 |
-
# im0 = ax0.imshow(input_image, cmap=cmap,
|
116 |
-
# origin=origin)
|
117 |
im1 = ax1.imshow(activation_1, cmap=cmap,
|
118 |
origin=origin)
|
119 |
im2 = ax2.imshow(activation_2, cmap=cmap,
|
@@ -178,7 +176,7 @@ def predict_and_analyze(model_name, num_channels, dim, image):
|
|
178 |
|
179 |
print("Plotting")
|
180 |
|
181 |
-
origin = '
|
182 |
|
183 |
# plot input image
|
184 |
input_fig = plot_input(input_image, origin=origin)
|
@@ -217,8 +215,6 @@ if __name__ == "__main__":
|
|
217 |
outputs=[gr.Textbox(lines=1, label="Prediction", show_label=True),
|
218 |
# gr.Image(label="Input Image", show_label=True),
|
219 |
gr.Plot(label="Input Image", show_label=True),
|
220 |
-
# gr.Image(label="Activation 1", show_label=True),
|
221 |
-
# gr.Image(label="Actication 2", show_label=True)],
|
222 |
gr.Plot(label="Mean-Subtracted Activations", show_label=True),
|
223 |
gr.Plot(label="Raw Activations", show_label=True)
|
224 |
],
|
|
|
112 |
|
113 |
ax1, ax2 = axs[0], axs[1]
|
114 |
|
|
|
|
|
115 |
im1 = ax1.imshow(activation_1, cmap=cmap,
|
116 |
origin=origin)
|
117 |
im2 = ax2.imshow(activation_2, cmap=cmap,
|
|
|
176 |
|
177 |
print("Plotting")
|
178 |
|
179 |
+
origin = 'upper'
|
180 |
|
181 |
# plot input image
|
182 |
input_fig = plot_input(input_image, origin=origin)
|
|
|
215 |
outputs=[gr.Textbox(lines=1, label="Prediction", show_label=True),
|
216 |
# gr.Image(label="Input Image", show_label=True),
|
217 |
gr.Plot(label="Input Image", show_label=True),
|
|
|
|
|
218 |
gr.Plot(label="Mean-Subtracted Activations", show_label=True),
|
219 |
gr.Plot(label="Raw Activations", show_label=True)
|
220 |
],
|