Commit
·
6e0cd8e
1
Parent(s):
5bb43dd
28. Sept. 2024, 17:03
Browse files
app.py
CHANGED
@@ -338,16 +338,12 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, titl
|
|
338 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
339 |
|
340 |
def set_inputs(tab, all_run_btns):
|
|
|
341 |
# global input_options
|
342 |
-
|
343 |
-
lineart_btn = all_run_btns[0]
|
344 |
-
canny_btn = all_run_btns[1]
|
345 |
-
|
346 |
lineart_btn_visible = True if tab == "tab_lineart" else False
|
347 |
canny_btn_visible = True if tab == "tab_canny" else False
|
348 |
-
|
349 |
-
|
350 |
-
return all_run_btns
|
351 |
|
352 |
run_btn_lineart = gr.Button("Run", visible=False)
|
353 |
run_btn_canny = gr.Button("Run", visible=False)
|
|
|
338 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
339 |
|
340 |
def set_inputs(tab, all_run_btns):
|
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
|
344 |
canny_btn_visible = True if tab == "tab_canny" else False
|
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)
|