Significant commited on
Commit
4d68b3c
·
verified ·
1 Parent(s): e1a894a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -381,17 +381,14 @@ a[href*="api"], .api-button, #api-button {
381
 
382
  def update_prompt_buttons_visibility(gender):
383
  if gender == "man":
384
- return (
385
- gr.update(visible=True), # show popup
386
- [gr.update(visible=True) for _ in man_btns],
387
- [gr.update(visible=False) for _ in woman_btns]
388
- )
389
  else:
390
- return (
391
- gr.update(visible=True), # show popup
392
- [gr.update(visible=False) for _ in man_btns],
393
- [gr.update(visible=True) for _ in woman_btns]
394
- )
395
 
396
 
397
  with gr.Blocks(css=css) as demo:
 
381
 
382
  def update_prompt_buttons_visibility(gender):
383
  if gender == "man":
384
+ return [gr.update(visible=True)] + \
385
+ [gr.update(visible=True) for _ in man_btns] + \
386
+ [gr.update(visible=False) for _ in woman_btns]
 
 
387
  else:
388
+ return [gr.update(visible=True)] + \
389
+ [gr.update(visible=False) for _ in man_btns] + \
390
+ [gr.update(visible=True) for _ in woman_btns]
391
+
 
392
 
393
 
394
  with gr.Blocks(css=css) as demo: