Lifeinhockey commited on
Commit
4cc70e1
·
verified ·
1 Parent(s): 007b8f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -236,10 +236,10 @@ with gr.Blocks(css=css) as demo:
236
  result = gr.Image(label="Result", show_label=False)
237
 
238
  def toggle_control_net_visibility(use_control_net):
239
- return gr.update(visible=use_control_net, elem_id="control_net_row")
240
-
241
- use_control_net.change(toggle_control_net_visibility, inputs=[use_control_net], outputs=[gr.update()])
242
 
 
 
243
  gr.on(
244
  triggers=[run_button.click, prompt.submit],
245
  fn=infer,
 
236
  result = gr.Image(label="Result", show_label=False)
237
 
238
  def toggle_control_net_visibility(use_control_net):
239
+ return {"visible": use_control_net}
 
 
240
 
241
+ use_control_net.change(fn=toggle_control_net_visibility, inputs=[use_control_net], outputs=["control_net_row"])
242
+
243
  gr.on(
244
  triggers=[run_button.click, prompt.submit],
245
  fn=infer,