Sebastiankay commited on
Commit
444af75
·
1 Parent(s): e231ab1

28. Sept. 2024, 17:53

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -337,7 +337,13 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, titl
337
  high_threshold = gr.Slider(label="high_threshold", minimum=1, maximum=255, value=200, step=1)
338
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
339
 
 
 
 
 
 
340
  def set_inputs(tab):
 
341
  tab = "tab_lineart" if tab is None else tab
342
  # global input_options
343
  lineart_btn_visible = True if tab == "tab_lineart" else False
@@ -345,11 +351,6 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, titl
345
 
346
  return [{"visible": lineart_btn_visible, "__type__": "update"}, {"visible": canny_btn_visible, "__type__": "update"}]
347
 
348
- run_btn_lineart = gr.Button("Run", visible=False)
349
- run_btn_canny = gr.Button("Run", visible=False)
350
-
351
- all_run_btns = [run_btn_lineart, run_btn_canny]
352
- print("all_run_btns:", all_run_btns)
353
  tab_lineart.select(set_inputs("tab_lineart"), inputs=None, outputs=all_run_btns)
354
 
355
  with gr.Column(scale=2):
 
337
  high_threshold = gr.Slider(label="high_threshold", minimum=1, maximum=255, value=200, step=1)
338
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
339
 
340
+ run_btn_lineart = gr.Button("Run", visible=False)
341
+ run_btn_canny = gr.Button("Run", visible=False)
342
+
343
+ all_run_btns = [run_btn_lineart, run_btn_canny]
344
+
345
  def set_inputs(tab):
346
+ print("all_run_btns:", all_run_btns)
347
  tab = "tab_lineart" if tab is None else tab
348
  # global input_options
349
  lineart_btn_visible = True if tab == "tab_lineart" else False
 
351
 
352
  return [{"visible": lineart_btn_visible, "__type__": "update"}, {"visible": canny_btn_visible, "__type__": "update"}]
353
 
 
 
 
 
 
354
  tab_lineart.select(set_inputs("tab_lineart"), inputs=None, outputs=all_run_btns)
355
 
356
  with gr.Column(scale=2):