Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,18 +59,20 @@ with gr.Blocks() as demo:
|
|
| 59 |
"""
|
| 60 |
)
|
| 61 |
|
|
|
|
| 62 |
output = [gr.Image(label=m, min_width=480) for m in default_models]
|
| 63 |
current_models = [gr.Textbox(m, visible=False) for m in default_models]
|
| 64 |
|
| 65 |
with gr.Row():
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
|
|
|
| 74 |
|
| 75 |
with gr.Accordion('Model selection'):
|
| 76 |
model_choice = gr.CheckboxGroup(models, label=f'Choose up to {num_models} different models from the best available!', value=default_models, interactive=True)
|
|
|
|
| 59 |
"""
|
| 60 |
)
|
| 61 |
|
| 62 |
+
# Layout for 3 columns and 2 rows
|
| 63 |
output = [gr.Image(label=m, min_width=480) for m in default_models]
|
| 64 |
current_models = [gr.Textbox(m, visible=False) for m in default_models]
|
| 65 |
|
| 66 |
with gr.Row():
|
| 67 |
+
with gr.Column():
|
| 68 |
+
for i in range(0, 6, 3):
|
| 69 |
+
with gr.Row():
|
| 70 |
+
for j in range(3):
|
| 71 |
+
if i + j < len(output):
|
| 72 |
+
o = output[i + j]
|
| 73 |
+
m = current_models[i + j]
|
| 74 |
+
gen_event = gen_button.click(gen_fn, [m, txt_input, neg_prompt, image_style], o, concurrency_limit=10)
|
| 75 |
+
stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
|
| 76 |
|
| 77 |
with gr.Accordion('Model selection'):
|
| 78 |
model_choice = gr.CheckboxGroup(models, label=f'Choose up to {num_models} different models from the best available!', value=default_models, interactive=True)
|