Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -389,7 +389,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=custom_css, title="PEEB") as demo:
|
|
389 |
with gr.Column():
|
390 |
title_text = gr.Markdown("# A classifier with Part-based Explainable and Editable Bottleneck (PEEB) | Demo")
|
391 |
gr.Markdown(
|
392 |
-
"
|
393 |
Here is a PEEB classifier pre-trained on Bird-11K and finetuned on CUB-200 (see our [NAACL 2024 paper](https://arxiv.org/abs/2403.05297) and [code](https://github.com/anguyen8/peeb/tree/inspect_ddp)).\n The demo shows how one runs PEEB on an existing image and edit descriptors to modify the classifier (without any re-training).
|
394 |
\n
|
395 |
Steps:
|
@@ -397,7 +397,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=custom_css, title="PEEB") as demo:
|
|
397 |
2. **Hover mouse over text descriptors** to see the corresponding region used to match to each text descriptor.
|
398 |
3. **Edit the text under [Custom Descriptions]()** which correspond to one extra, new class (i.e. 200+1 = 201). Further editing will overwrite this class' descriptors.
|
399 |
4. **Click on Predict** to see the grounded explanations and the top-1 label for the newly modified CUB-201 classifier.
|
400 |
-
"
|
401 |
)
|
402 |
|
403 |
# display the gallery of images
|
@@ -423,7 +423,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=custom_css, title="PEEB") as demo:
|
|
423 |
# xclip_edit_button = gr.Button(label="Edit", value="Reset Descriptions")
|
424 |
xclip_edit_button = gr.Button(value="Reset Descriptions")
|
425 |
custom_pred_label = gr.Markdown(
|
426 |
-
"### Custom
|
427 |
)
|
428 |
xclip_textbox = gr.Textbox(lines=12, placeholder="Edit the descriptions here", visible=False)
|
429 |
# ai_explanation = gr.Image(type="numpy", visible=True, show_label=False, height=500)
|
|
|
389 |
with gr.Column():
|
390 |
title_text = gr.Markdown("# A classifier with Part-based Explainable and Editable Bottleneck (PEEB) | Demo")
|
391 |
gr.Markdown(
|
392 |
+
"""
|
393 |
Here is a PEEB classifier pre-trained on Bird-11K and finetuned on CUB-200 (see our [NAACL 2024 paper](https://arxiv.org/abs/2403.05297) and [code](https://github.com/anguyen8/peeb/tree/inspect_ddp)).\n The demo shows how one runs PEEB on an existing image and edit descriptors to modify the classifier (without any re-training).
|
394 |
\n
|
395 |
Steps:
|
|
|
397 |
2. **Hover mouse over text descriptors** to see the corresponding region used to match to each text descriptor.
|
398 |
3. **Edit the text under [Custom Descriptions]()** which correspond to one extra, new class (i.e. 200+1 = 201). Further editing will overwrite this class' descriptors.
|
399 |
4. **Click on Predict** to see the grounded explanations and the top-1 label for the newly modified CUB-201 classifier.
|
400 |
+
"""
|
401 |
)
|
402 |
|
403 |
# display the gallery of images
|
|
|
423 |
# xclip_edit_button = gr.Button(label="Edit", value="Reset Descriptions")
|
424 |
xclip_edit_button = gr.Button(value="Reset Descriptions")
|
425 |
custom_pred_label = gr.Markdown(
|
426 |
+
"### Custom Descriptions:"
|
427 |
)
|
428 |
xclip_textbox = gr.Textbox(lines=12, placeholder="Edit the descriptions here", visible=False)
|
429 |
# ai_explanation = gr.Image(type="numpy", visible=True, show_label=False, height=500)
|