Spaces:
Running
Running
charliebaby2023
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -61,9 +61,9 @@ def make_me():
|
|
61 |
with gr.Row():
|
62 |
output = [gr.Image(label=m, height=170) for m in default_models]
|
63 |
current_models = [gr.Textbox(m, visible=False) for m in default_models]
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
with gr.Accordion('Model selection'):
|
68 |
model_choice = gr.CheckboxGroup(models, label=f' {num_models} different models selected', value=default_models, multiselect=True, max_choices=num_models, interactive=True, filterable=False)
|
69 |
model_choice.change(update_imgbox, model_choice, output)
|
|
|
61 |
with gr.Row():
|
62 |
output = [gr.Image(label=m, height=170) for m in default_models]
|
63 |
current_models = [gr.Textbox(m, visible=False) for m in default_models]
|
64 |
+
for m, o in zip(current_models, output):
|
65 |
+
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
66 |
+
stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
|
67 |
with gr.Accordion('Model selection'):
|
68 |
model_choice = gr.CheckboxGroup(models, label=f' {num_models} different models selected', value=default_models, multiselect=True, max_choices=num_models, interactive=True, filterable=False)
|
69 |
model_choice.change(update_imgbox, model_choice, output)
|