Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -111,11 +111,11 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", fill_width=True, css=css) as demo:
|
|
111 |
gen_event = gr.on(triggers=[run_button.click, prompt.submit],
|
112 |
fn=lambda i, n, m, t1, t2, l1, l2, l3, l4: infer_fn(m, t1, t2, l1, l2, l3, l4) if (i < n) else None,
|
113 |
inputs=[img_i, image_num, model_name, prompt, neg_prompt, positive_prefix, positive_suffix, negative_prefix, negative_suffix],
|
114 |
-
outputs=[o], queue=True, show_api=
|
115 |
gen_event2 = gr.on(triggers=[random_button.click],
|
116 |
fn=lambda i, n, m, t1, t2, l1, l2, l3, l4: infer_rand_fn(m, t1, t2, l1, l2, l3, l4) if (i < n) else None,
|
117 |
inputs=[img_i, image_num, model_name, prompt, neg_prompt, positive_prefix, positive_suffix, negative_prefix, negative_suffix],
|
118 |
-
outputs=[o], queue=True, show_api=
|
119 |
o.change(save_gallery, [o, results], [results, image_files], show_api=False)
|
120 |
stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event, gen_event2], show_api=False)
|
121 |
|
|
|
111 |
gen_event = gr.on(triggers=[run_button.click, prompt.submit],
|
112 |
fn=lambda i, n, m, t1, t2, l1, l2, l3, l4: infer_fn(m, t1, t2, l1, l2, l3, l4) if (i < n) else None,
|
113 |
inputs=[img_i, image_num, model_name, prompt, neg_prompt, positive_prefix, positive_suffix, negative_prefix, negative_suffix],
|
114 |
+
outputs=[o], queue=True, show_api=False)
|
115 |
gen_event2 = gr.on(triggers=[random_button.click],
|
116 |
fn=lambda i, n, m, t1, t2, l1, l2, l3, l4: infer_rand_fn(m, t1, t2, l1, l2, l3, l4) if (i < n) else None,
|
117 |
inputs=[img_i, image_num, model_name, prompt, neg_prompt, positive_prefix, positive_suffix, negative_prefix, negative_suffix],
|
118 |
+
outputs=[o], queue=True, show_api=False)
|
119 |
o.change(save_gallery, [o, results], [results, image_files], show_api=False)
|
120 |
stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event, gen_event2], show_api=False)
|
121 |
|