Update app.py
Browse filesdisabled the "suggested prompts" button
app.py
CHANGED
|
@@ -540,11 +540,11 @@ with gr.Blocks(css=css) as demo:
|
|
| 540 |
|
| 541 |
|
| 542 |
with gr.Row():
|
| 543 |
-
|
| 544 |
|
| 545 |
-
with gr.Group(visible=False, elem_id="prompt_suggestions_box") as prompt_suggestions:
|
| 546 |
-
|
| 547 |
-
|
| 548 |
|
| 549 |
# theme_buttons = [gr.Button(theme, visible=False) for theme in man_prompts.keys()]
|
| 550 |
# for theme in man_prompts.keys():
|
|
@@ -556,12 +556,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 556 |
# outputs=[prompt, selected_theme, prompt_suggestions]
|
| 557 |
# )
|
| 558 |
|
| 559 |
-
for theme, btn in zip(man_prompts.keys(), theme_buttons):
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
|
| 566 |
|
| 567 |
|
|
@@ -572,13 +572,14 @@ with gr.Blocks(css=css) as demo:
|
|
| 572 |
# prompt_buttons.append((b, s))
|
| 573 |
|
| 574 |
# suggestion_buttons = [gr.Button(s) for s in current_suggestions.value]
|
| 575 |
-
|
| 576 |
|
| 577 |
-
close_btn.click(
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
)
|
|
|
|
| 582 |
|
| 583 |
# def update_buttons_hidden(gender):
|
| 584 |
# updates = update_prompt_buttons_visibility(gender)
|
|
@@ -752,10 +753,10 @@ with gr.Blocks(css=css) as demo:
|
|
| 752 |
)
|
| 753 |
|
| 754 |
# Show the suggestions popup
|
| 755 |
-
show_prompts_btn.click(
|
| 756 |
-
|
| 757 |
-
|
| 758 |
-
)
|
| 759 |
|
| 760 |
# Close the popup
|
| 761 |
# close_btn.click(
|
|
|
|
| 540 |
|
| 541 |
|
| 542 |
with gr.Row():
|
| 543 |
+
# show_prompts_btn = gr.Button("💡 Suggested Prompts", elem_id="suggested_prompts_btn")
|
| 544 |
|
| 545 |
+
# with gr.Group(visible=False, elem_id="prompt_suggestions_box") as prompt_suggestions:
|
| 546 |
+
# with gr.Column(elem_classes="scrollable-prompts"):
|
| 547 |
+
# gr.Markdown("### Suggested Prompts")
|
| 548 |
|
| 549 |
# theme_buttons = [gr.Button(theme, visible=False) for theme in man_prompts.keys()]
|
| 550 |
# for theme in man_prompts.keys():
|
|
|
|
| 556 |
# outputs=[prompt, selected_theme, prompt_suggestions]
|
| 557 |
# )
|
| 558 |
|
| 559 |
+
# for theme, btn in zip(man_prompts.keys(), theme_buttons):
|
| 560 |
+
# btn.click(
|
| 561 |
+
# fn=lambda gender, t=theme: gr.update(value=get_prompts_by_gender(gender)[t]),
|
| 562 |
+
# inputs=gender_selector,
|
| 563 |
+
# outputs=prompt
|
| 564 |
+
# )
|
| 565 |
|
| 566 |
|
| 567 |
|
|
|
|
| 572 |
# prompt_buttons.append((b, s))
|
| 573 |
|
| 574 |
# suggestion_buttons = [gr.Button(s) for s in current_suggestions.value]
|
| 575 |
+
# close_btn = gr.Button("❌ Close", elem_id="close_prompt_box")
|
| 576 |
|
| 577 |
+
# close_btn.click(
|
| 578 |
+
# fn=lambda: gr.update(visible=False),
|
| 579 |
+
# inputs=None,
|
| 580 |
+
# outputs=prompt_suggestions
|
| 581 |
+
# )
|
| 582 |
+
pass
|
| 583 |
|
| 584 |
# def update_buttons_hidden(gender):
|
| 585 |
# updates = update_prompt_buttons_visibility(gender)
|
|
|
|
| 753 |
)
|
| 754 |
|
| 755 |
# Show the suggestions popup
|
| 756 |
+
# show_prompts_btn.click(
|
| 757 |
+
# fn=lambda: gr.update(visible=True),
|
| 758 |
+
# outputs=prompt_suggestions
|
| 759 |
+
# )
|
| 760 |
|
| 761 |
# Close the popup
|
| 762 |
# close_btn.click(
|