Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,6 +39,9 @@ def resize_image(input_path, output_path, target_height):
|
|
39 |
|
40 |
return output_path, new_width, target_height
|
41 |
|
|
|
|
|
|
|
42 |
def load_pipeline(control_type):
|
43 |
if control_type == "canny":
|
44 |
pipe_canny = StableDiffusion3ControlNetPipeline.from_pretrained(
|
@@ -140,6 +143,10 @@ with gr.Blocks(css=css) as demo:
|
|
140 |
|
141 |
|
142 |
submit_canny_btn.click(
|
|
|
|
|
|
|
|
|
143 |
fn = load_pipeline,
|
144 |
inputs = [control_type],
|
145 |
outputs = [models]
|
|
|
39 |
|
40 |
return output_path, new_width, target_height
|
41 |
|
42 |
+
def show_hidden():
|
43 |
+
return gr.update(visible=True)
|
44 |
+
|
45 |
def load_pipeline(control_type):
|
46 |
if control_type == "canny":
|
47 |
pipe_canny = StableDiffusion3ControlNetPipeline.from_pretrained(
|
|
|
143 |
|
144 |
|
145 |
submit_canny_btn.click(
|
146 |
+
fn = show_hidden,
|
147 |
+
inputs = None,
|
148 |
+
outputs = [models]
|
149 |
+
).then(
|
150 |
fn = load_pipeline,
|
151 |
inputs = [control_type],
|
152 |
outputs = [models]
|