Kims12 commited on
Commit
c6edb28
·
verified ·
1 Parent(s): 2757de0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -414,7 +414,6 @@ with gr.Blocks() as demo:
414
  selection_preview = gr.Textbox(
415
  label="선택 내용 미리보기",
416
  lines=8,
417
- interactive=False,
418
  visible=False
419
  )
420
 
@@ -476,20 +475,20 @@ with gr.Blocks() as demo:
476
  mood, selection_preview]
477
  )
478
 
 
 
 
 
 
 
 
 
479
  background_change_btn.click(
480
- fn=lambda: "배경 변경",
481
- inputs=[],
482
- outputs=prompt_input
483
- ).then(
484
- fn=lambda: "배경바꾸기",
485
  inputs=[],
486
- outputs=current_selection
487
- ).then(
488
- fn=toggle_background_options,
489
- inputs=[current_selection],
490
- outputs=[background_header, product_name, product_category, background_type,
491
- background_style, additional_header, lighting, texture, color_tone,
492
- mood, selection_preview]
493
  )
494
 
495
  composite_product_btn.click(
 
414
  selection_preview = gr.Textbox(
415
  label="선택 내용 미리보기",
416
  lines=8,
 
417
  visible=False
418
  )
419
 
 
475
  mood, selection_preview]
476
  )
477
 
478
+ # 배경 변경 버튼 클릭 이벤트를 더 간단하게 수정
479
+ def show_background_options():
480
+ return ("배경 변경", "배경바꾸기",
481
+ gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
482
+ gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
483
+ gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
484
+ gr.update(visible=True))
485
+
486
  background_change_btn.click(
487
+ fn=show_background_options,
 
 
 
 
488
  inputs=[],
489
+ outputs=[prompt_input, current_selection, background_header, product_name, product_category,
490
+ background_type, background_style, additional_header, lighting, texture,
491
+ color_tone, mood, selection_preview]
 
 
 
 
492
  )
493
 
494
  composite_product_btn.click(