Update app.py
Browse files
app.py
CHANGED
|
@@ -625,14 +625,16 @@ with gr.Blocks(css=css) as demo:
|
|
| 625 |
|
| 626 |
# When user clicks on a suggestion, fill the prompt textbox and close popup
|
| 627 |
for b in man_btns + woman_btns:
|
|
|
|
| 628 |
b.click(
|
| 629 |
-
fn=lambda
|
| 630 |
inputs=None,
|
| 631 |
outputs=[prompt, prompt_suggestions]
|
| 632 |
)
|
| 633 |
|
| 634 |
|
| 635 |
|
|
|
|
| 636 |
# gr.Examples(
|
| 637 |
# examples=get_example(),
|
| 638 |
# inputs=[files, prompt, style, negative_prompt],
|
|
|
|
| 625 |
|
| 626 |
# When user clicks on a suggestion, fill the prompt textbox and close popup
|
| 627 |
for b in man_btns + woman_btns:
|
| 628 |
+
text = b.value # capture current button text
|
| 629 |
b.click(
|
| 630 |
+
fn=lambda _, t=text: (gr.update(value=t), gr.update(visible=False)),
|
| 631 |
inputs=None,
|
| 632 |
outputs=[prompt, prompt_suggestions]
|
| 633 |
)
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
+
|
| 638 |
# gr.Examples(
|
| 639 |
# examples=get_example(),
|
| 640 |
# inputs=[files, prompt, style, negative_prompt],
|