Sebastiankay commited on
Commit
6792656
·
1 Parent(s): 7ef0ba3

28. Sept. 2024, 18:07

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -338,10 +338,10 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, titl
338
  run_btn_lineart = gr.Button("Run", visible=False)
339
  run_btn_canny = gr.Button("Run", visible=False)
340
 
341
- all_run_btns = [run_btn_lineart, run_btn_canny]
342
 
343
  def set_inputs(tab):
344
- print("all_run_btns:", all_run_btns)
345
  tab = "tab_lineart" if tab is None else tab
346
  # global input_options
347
  lineart_btn_visible = True if tab == "tab_lineart" else False
@@ -349,7 +349,7 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, titl
349
 
350
  return {"visible": lineart_btn_visible, "__type__": "update"}, {"visible": canny_btn_visible, "__type__": "update"}
351
 
352
- tab_lineart.select(fn=set_inputs("tab_lineart"), inputs=None, outputs=all_run_btns)
353
 
354
  with gr.Column(scale=2):
355
  gallery = gr.Gallery(label="Generated images", show_label=False, interactive=False, format="png", elem_id="output_gallery", elem_classes="output-gallery", columns=[3], rows=[2], object_fit="contain", height="auto", type="filepath")
 
338
  run_btn_lineart = gr.Button("Run", visible=False)
339
  run_btn_canny = gr.Button("Run", visible=False)
340
 
341
+ # all_run_btns = [run_btn_lineart, run_btn_canny]
342
 
343
  def set_inputs(tab):
344
+ print("all_run_btns:", [run_btn_lineart, run_btn_canny])
345
  tab = "tab_lineart" if tab is None else tab
346
  # global input_options
347
  lineart_btn_visible = True if tab == "tab_lineart" else False
 
349
 
350
  return {"visible": lineart_btn_visible, "__type__": "update"}, {"visible": canny_btn_visible, "__type__": "update"}
351
 
352
+ tab_lineart.select(fn=set_inputs("tab_lineart"), inputs=None, outputs=[run_btn_lineart, run_btn_canny])
353
 
354
  with gr.Column(scale=2):
355
  gallery = gr.Gallery(label="Generated images", show_label=False, interactive=False, format="png", elem_id="output_gallery", elem_classes="output-gallery", columns=[3], rows=[2], object_fit="contain", height="auto", type="filepath")