Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -121,7 +121,7 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=CSS) as demo:
|
|
121 |
for m, o in zip(current_models, output):
|
122 |
gen_event = gr.on(triggers=[gen_button.click, txt_input.submit], fn=gen_fn, inputs=[m, txt_input], outputs=[o])
|
123 |
o.change(add_gallery, [o, m, gallery], [gallery])
|
124 |
-
stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels
|
125 |
|
126 |
with gr.Column(scale=4):
|
127 |
with gr.Accordion('Model selection'):
|
@@ -158,7 +158,7 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=CSS) as demo:
|
|
158 |
fn=lambda i, n, m, t: gen_fn(m, t) if (i < n) else None,
|
159 |
inputs=[img_i, num_images, model_choice2, txt_input2], outputs=[o])
|
160 |
o.change(add_gallery, [o, model_choice2, gallery2], [gallery2])
|
161 |
-
stop_button2.click(lambda: gr.update(interactive
|
162 |
|
163 |
gr.Markdown("Based on the [TestGen](https://huggingface.co/spaces/derwahnsinn/TestGen) Space by derwahnsinn, the [SpacIO](https://huggingface.co/spaces/RdnUser77/SpacIO_v1) Space by RdnUser77 and Omnibus's Maximum Multiplier!")
|
164 |
|
|
|
121 |
for m, o in zip(current_models, output):
|
122 |
gen_event = gr.on(triggers=[gen_button.click, txt_input.submit], fn=gen_fn, inputs=[m, txt_input], outputs=[o])
|
123 |
o.change(add_gallery, [o, m, gallery], [gallery])
|
124 |
+
stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
|
125 |
|
126 |
with gr.Column(scale=4):
|
127 |
with gr.Accordion('Model selection'):
|
|
|
158 |
fn=lambda i, n, m, t: gen_fn(m, t) if (i < n) else None,
|
159 |
inputs=[img_i, num_images, model_choice2, txt_input2], outputs=[o])
|
160 |
o.change(add_gallery, [o, model_choice2, gallery2], [gallery2])
|
161 |
+
stop_button2.click(lambda: gr.update(interactive=False), None, stop_button2, cancels=[gen_event2])
|
162 |
|
163 |
gr.Markdown("Based on the [TestGen](https://huggingface.co/spaces/derwahnsinn/TestGen) Space by derwahnsinn, the [SpacIO](https://huggingface.co/spaces/RdnUser77/SpacIO_v1) Space by RdnUser77 and Omnibus's Maximum Multiplier!")
|
164 |
|