Commit
·
352f7e9
1
Parent(s):
6792656
28. Sept. 2024, 18:16
Browse files
app.py
CHANGED
@@ -341,7 +341,6 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, titl
|
|
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,7 +348,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=[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")
|
|
|
341 |
# all_run_btns = [run_btn_lineart, run_btn_canny]
|
342 |
|
343 |
def set_inputs(tab):
|
|
|
344 |
tab = "tab_lineart" if tab is None else tab
|
345 |
# global input_options
|
346 |
lineart_btn_visible = True if tab == "tab_lineart" else False
|
|
|
348 |
|
349 |
return {"visible": lineart_btn_visible, "__type__": "update"}, {"visible": canny_btn_visible, "__type__": "update"}
|
350 |
|
351 |
+
tab_lineart.select(fn=lambda: set_inputs("tab_lineart"), inputs=None, outputs=[run_btn_lineart, run_btn_canny])
|
352 |
|
353 |
with gr.Column(scale=2):
|
354 |
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")
|