Spaces:
Running
Running
charliebaby2023
commited on
Commit
•
0a4458d
1
Parent(s):
853ca96
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def gen_fn(model_str, prompt):
|
|
44 |
return models_load[model_str](f'{prompt} {noise}')
|
45 |
|
46 |
def make_me():
|
47 |
-
|
48 |
txt_input = gr.Textbox(lines=2, value=kii, width=300, height=100)
|
49 |
#txt_input = gr.Textbox(label='Your prompt:', lines=2, value=kii)
|
50 |
|
@@ -58,17 +58,17 @@ def make_me():
|
|
58 |
</body>
|
59 |
</div>
|
60 |
""")
|
61 |
-
|
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 |
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 |
-
|
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)
|
70 |
model_choice.change(extend_choices, model_choice, current_models)
|
71 |
-
|
72 |
gr.HTML("""
|
73 |
<div class="footer">
|
74 |
<p> Based on the <a href="https://huggingface.co/spaces/derwahnsinn/TestGen">TestGen</a> Space by derwahnsinn, the <a href="https://huggingface.co/spaces/RdnUser77/SpacIO_v1">SpacIO</a> Space by RdnUser77 and Omnibus's Maximum Multiplier!
|
|
|
44 |
return models_load[model_str](f'{prompt} {noise}')
|
45 |
|
46 |
def make_me():
|
47 |
+
with gr.Row():
|
48 |
txt_input = gr.Textbox(lines=2, value=kii, width=300, height=100)
|
49 |
#txt_input = gr.Textbox(label='Your prompt:', lines=2, value=kii)
|
50 |
|
|
|
58 |
</body>
|
59 |
</div>
|
60 |
""")
|
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)
|
70 |
model_choice.change(extend_choices, model_choice, current_models)
|
71 |
+
with gr.Row():
|
72 |
gr.HTML("""
|
73 |
<div class="footer">
|
74 |
<p> Based on the <a href="https://huggingface.co/spaces/derwahnsinn/TestGen">TestGen</a> Space by derwahnsinn, the <a href="https://huggingface.co/spaces/RdnUser77/SpacIO_v1">SpacIO</a> Space by RdnUser77 and Omnibus's Maximum Multiplier!
|