Significant commited on
Commit
bd82a06
·
verified ·
1 Parent(s): 1f14fe6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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 prompt_text=btn.label: (gr.update(value=prompt_text), gr.update(visible=False)),
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],