Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -218,8 +218,8 @@ with gr.Blocks(css=css) as demo:
|
|
218 |
with gr.Row():
|
219 |
use_control_net = gr.Checkbox(label="Use ControlNet", value=False)
|
220 |
|
221 |
-
with gr.Column(visible=False) as controlnet_column:
|
222 |
-
|
223 |
with gr.Row():
|
224 |
control_strength_slider = gr.Slider(minimum=0, maximum=1, step=0.01, label="Control Strength")
|
225 |
|
@@ -237,15 +237,15 @@ with gr.Blocks(css=css) as demo:
|
|
237 |
# else:
|
238 |
# return controlnet_column.visible=False #gr.Column.update(visible=False)
|
239 |
|
240 |
-
def toggle_controlnet_options(use_control_net):
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
|
247 |
|
248 |
-
gr.Interface(toggle_controlnet_options(use_control_net), inputs=[use_control_net], outputs=[controlnet_column], live=True,).launch()
|
249 |
#use_control_net.change(fn=toggle_controlnet_options, inputs=[use_control_net], outputs=[controlnet_column], show_progress=False)
|
250 |
|
251 |
|
|
|
218 |
with gr.Row():
|
219 |
use_control_net = gr.Checkbox(label="Use ControlNet", value=False)
|
220 |
|
221 |
+
#with gr.Column(visible=False) as controlnet_column:
|
222 |
+
with gr.Column(visible=True) as controlnet_column:
|
223 |
with gr.Row():
|
224 |
control_strength_slider = gr.Slider(minimum=0, maximum=1, step=0.01, label="Control Strength")
|
225 |
|
|
|
237 |
# else:
|
238 |
# return controlnet_column.visible=False #gr.Column.update(visible=False)
|
239 |
|
240 |
+
# def toggle_controlnet_options(use_control_net):
|
241 |
+
# if use_control_net:
|
242 |
+
# controlnet_column.visible=True #gr.Column.update(visible=True)
|
243 |
+
# else:
|
244 |
+
# controlnet_column.visible=False #gr.Column.update(visible=False)
|
245 |
+
# return controlnet_column.visible
|
246 |
|
247 |
|
248 |
+
#gr.Interface(toggle_controlnet_options(use_control_net), inputs=[use_control_net], outputs=[controlnet_column], live=True,).launch()
|
249 |
#use_control_net.change(fn=toggle_controlnet_options, inputs=[use_control_net], outputs=[controlnet_column], show_progress=False)
|
250 |
|
251 |
|