charliebaby2023
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -87,8 +87,8 @@ def make_me():
|
|
87 |
refresh_button.click(fn=get_current_time, outputs=time_textbox)
|
88 |
|
89 |
gen_button = gr.Button('Generate up to 6 images in up to 3 minutes total')
|
90 |
-
stop_button = gr.Button('Stop', variant = 'secondary', interactive =
|
91 |
-
gen_button.click(lambda s: gr.update(interactive = True
|
92 |
gr.HTML(
|
93 |
"""
|
94 |
<div style="text-align: center; max-width: 1200px; margin: 0 auto;">
|
@@ -106,7 +106,7 @@ def make_me():
|
|
106 |
current_models = [gr.Textbox(m, visible = False) for m in default_models]
|
107 |
|
108 |
for m, o in zip(current_models, output):
|
109 |
-
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
110 |
stop_button.click(lambda s: gr.update(interactive = False), None, stop_button, cancels = [gen_event])
|
111 |
with gr.Accordion('Model selection'):
|
112 |
model_choice = gr.CheckboxGroup(models, label = f'Choose up to {num_models} different models from the 800 available!', value = default_models, multiselect = True, max_choices = num_models, interactive = True, filterable = False)
|
|
|
87 |
refresh_button.click(fn=get_current_time, outputs=time_textbox)
|
88 |
|
89 |
gen_button = gr.Button('Generate up to 6 images in up to 3 minutes total')
|
90 |
+
stop_button = gr.Button('Stop', variant = 'secondary', interactive = True)
|
91 |
+
gen_button.click(lambda s: gr.update(interactive = True ), None, stop_button)
|
92 |
gr.HTML(
|
93 |
"""
|
94 |
<div style="text-align: center; max-width: 1200px; margin: 0 auto;">
|
|
|
106 |
current_models = [gr.Textbox(m, visible = False) for m in default_models]
|
107 |
|
108 |
for m, o in zip(current_models, output):
|
109 |
+
gen_event = gen_button.click(gen_fn, [m, txt_input + random.randint(1,00)], o)
|
110 |
stop_button.click(lambda s: gr.update(interactive = False), None, stop_button, cancels = [gen_event])
|
111 |
with gr.Accordion('Model selection'):
|
112 |
model_choice = gr.CheckboxGroup(models, label = f'Choose up to {num_models} different models from the 800 available!', value = default_models, multiselect = True, max_choices = num_models, interactive = True, filterable = False)
|