Update app.py
Browse files
app.py
CHANGED
@@ -52,15 +52,14 @@ with gr.Blocks() as demo:
|
|
52 |
with gr.Row():
|
53 |
output = [gr.Image(label = m) for m in default_models]
|
54 |
current_models = [gr.Textbox(m, visible = False) for m in default_models]
|
55 |
-
|
56 |
-
model_choice.change(update_imgbox, model_choice, output)
|
57 |
-
model_choice.change(extend_choices, model_choice, current_models)
|
58 |
-
|
59 |
for m, o in zip(current_models, output):
|
60 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
61 |
stop_button.click(lambda s: gr.update(interactive = False), None, stop_button, cancels = [gen_event])
|
62 |
with gr.Accordion('Model selection'):
|
63 |
model_choice = gr.CheckboxGroup(models, label = f'Choose up to {num_models} different models', value = default_models, multiselect = True, max_choices = num_models, interactive = True, filterable = False)
|
|
|
|
|
64 |
|
65 |
demo.queue(concurrency_count = 200)
|
66 |
demo.launch()
|
|
|
52 |
with gr.Row():
|
53 |
output = [gr.Image(label = m) for m in default_models]
|
54 |
current_models = [gr.Textbox(m, visible = False) for m in default_models]
|
55 |
+
|
|
|
|
|
|
|
56 |
for m, o in zip(current_models, output):
|
57 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
58 |
stop_button.click(lambda s: gr.update(interactive = False), None, stop_button, cancels = [gen_event])
|
59 |
with gr.Accordion('Model selection'):
|
60 |
model_choice = gr.CheckboxGroup(models, label = f'Choose up to {num_models} different models', value = default_models, multiselect = True, max_choices = num_models, interactive = True, filterable = False)
|
61 |
+
model_choice.change(update_imgbox, model_choice, output)
|
62 |
+
model_choice.change(extend_choices, model_choice, current_models)
|
63 |
|
64 |
demo.queue(concurrency_count = 200)
|
65 |
demo.launch()
|