Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ with gr.Blocks() as app:
|
|
59 |
# Update fungsi sesuai kebutuhan
|
60 |
return generate_image(prompt, neg_prompt, width, height, scheduler, num_steps, num_images, cfg_scale, seed, model)
|
61 |
|
62 |
-
generate_button.click(fn=update_images, inputs=[prompt_input, neg_prompt_input, width_input, height_input, scheduler_input, num_steps_input, num_images_input, cfg_scale_input, seed_input, model_dropdown], outputs=[output_gallery, output_text])
|
63 |
|
64 |
# Tab untuk Image-to-Image
|
65 |
with gr.Tab("Image-to-Image"):
|
@@ -77,7 +77,7 @@ with gr.Blocks() as app:
|
|
77 |
# Update fungsi sesuai kebutuhan
|
78 |
return process_image(image, prompt, neg_prompt, model)
|
79 |
|
80 |
-
generate_button_i2i.click(fn=process_image_func, inputs=[image_input, prompt_input_i2i, neg_prompt_input_i2i, model_dropdown], outputs=output_image_i2i)
|
81 |
|
82 |
# Tab untuk ControlNet
|
83 |
with gr.Tab("ControlNet"):
|
@@ -94,7 +94,7 @@ with gr.Blocks() as app:
|
|
94 |
# Update fungsi sesuai kebutuhan
|
95 |
return controlnet_process(image, controlnet_type, model)
|
96 |
|
97 |
-
controlnet_button.click(fn=controlnet_process_func, inputs=[controlnet_image_input, controlnet_dropdown, model_dropdown], outputs=controlnet_output_image)
|
98 |
|
99 |
# Jalankan antarmuka
|
100 |
app.launch()
|
|
|
59 |
# Update fungsi sesuai kebutuhan
|
60 |
return generate_image(prompt, neg_prompt, width, height, scheduler, num_steps, num_images, cfg_scale, seed, model)
|
61 |
|
62 |
+
generate_button.click(fn=update_images, inputs=[prompt_input, neg_prompt_input, width_input, height_input, scheduler_input, num_steps_input, num_images_input, cfg_scale_input, seed_input, model_dropdown, vae_dropdown], outputs=[output_gallery, output_text])
|
63 |
|
64 |
# Tab untuk Image-to-Image
|
65 |
with gr.Tab("Image-to-Image"):
|
|
|
77 |
# Update fungsi sesuai kebutuhan
|
78 |
return process_image(image, prompt, neg_prompt, model)
|
79 |
|
80 |
+
generate_button_i2i.click(fn=process_image_func, inputs=[image_input, prompt_input_i2i, neg_prompt_input_i2i, model_dropdown, vae_dropdown], outputs=output_image_i2i)
|
81 |
|
82 |
# Tab untuk ControlNet
|
83 |
with gr.Tab("ControlNet"):
|
|
|
94 |
# Update fungsi sesuai kebutuhan
|
95 |
return controlnet_process(image, controlnet_type, model)
|
96 |
|
97 |
+
controlnet_button.click(fn=controlnet_process_func, inputs=[controlnet_image_input, controlnet_dropdown, model_dropdown, vae_dropdown], outputs=controlnet_output_image)
|
98 |
|
99 |
# Jalankan antarmuka
|
100 |
app.launch()
|