smoothjazzuser
commited on
Commit
·
aa40902
1
Parent(s):
27ca97b
Update app.py
Browse files
app.py
CHANGED
@@ -140,9 +140,9 @@ def gradio_interface(img):
|
|
140 |
smoothgrad_mask_grayscale, fig_img = saliency_graph(img, steps=20)
|
141 |
return smoothgrad_mask_grayscale, fig_img
|
142 |
|
143 |
-
with gr.Blocks(
|
144 |
#examples = gr.Examples(examples=["ex1.jpg", "ex2.jpg", "ex3.jpg", "ex4.jpg"], label="Examples", inputs="image", examples_per_page=4)
|
145 |
-
gr.Markdown("
|
146 |
with gr.Row():
|
147 |
with gr.Column():
|
148 |
test_image = gr.Image(label="Input Image", live=True)
|
|
|
140 |
smoothgrad_mask_grayscale, fig_img = saliency_graph(img, steps=20)
|
141 |
return smoothgrad_mask_grayscale, fig_img
|
142 |
|
143 |
+
with gr.Blocks(live=True) as iface:
|
144 |
#examples = gr.Examples(examples=["ex1.jpg", "ex2.jpg", "ex3.jpg", "ex4.jpg"], label="Examples", inputs="image", examples_per_page=4)
|
145 |
+
gr.Markdown("This function finds the most critical pixels in an image for predicting a class by looking at the pixels models attend to. The best models will ideally make predictions by highlighting the expected object. Poorly generalizable models will often rely on environmental cues instead and forego looking at the most important pixels. Highlighting the most important pixels helps explain/build trust about whether a given model uses the correct features to make its prediction.")
|
146 |
with gr.Row():
|
147 |
with gr.Column():
|
148 |
test_image = gr.Image(label="Input Image", live=True)
|