Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,8 @@ def load_fn(models):
|
|
| 32 |
m = gr.Interface(lambda txt: None, ['text'], ['image'])
|
| 33 |
models_load.update({model: m})
|
| 34 |
|
| 35 |
-
|
|
|
|
| 36 |
load_fn(models)
|
| 37 |
"""models = {}
|
| 38 |
load_fn(models)"""
|
|
@@ -90,17 +91,20 @@ def make_me():
|
|
| 90 |
for m, o in zip(current_models, output):
|
| 91 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
| 92 |
stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
|
| 93 |
-
|
|
|
|
|
|
|
|
|
|
| 94 |
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)
|
| 95 |
model_choice.change(update_imgbox, model_choice, output)
|
| 96 |
model_choice.change(extend_choices, model_choice, current_models)
|
| 97 |
-
|
| 98 |
"""with gr.Accordion('Group Model selection'):
|
| 99 |
group_model_choice = gr.CheckboxGroup(models_test, label=f' {len(models_test)} different group models', value=1, multiselect=False, max_choices=1, interactive=True, filterable=False)
|
| 100 |
"""
|
| 101 |
with gr.Accordion("test", open=True):
|
| 102 |
group_model_choice = gr.Dropdown(label="test Model", show_label=False, choices=list(models_test) , allow_custom_value=True)
|
| 103 |
-
group_model_choice.change(choice_group_a,group_model_choice,model_choice)
|
| 104 |
"""group_model_choice.change(choice_group_b,group_model_choice,output)
|
| 105 |
group_model_choice.change(choice_group_c,group_model_choice,current_models)"""
|
| 106 |
with gr.Row():
|
|
|
|
| 32 |
m = gr.Interface(lambda txt: None, ['text'], ['image'])
|
| 33 |
models_load.update({model: m})
|
| 34 |
|
| 35 |
+
|
| 36 |
+
"""models = models_test[1]"""
|
| 37 |
load_fn(models)
|
| 38 |
"""models = {}
|
| 39 |
load_fn(models)"""
|
|
|
|
| 91 |
for m, o in zip(current_models, output):
|
| 92 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
| 93 |
stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
|
| 94 |
+
choices=models_test[0]
|
| 95 |
+
output=update_imgbox(choices)
|
| 96 |
+
current_models=extend_choices(choices)
|
| 97 |
+
"""with gr.Accordion('Model selection'):
|
| 98 |
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)
|
| 99 |
model_choice.change(update_imgbox, model_choice, output)
|
| 100 |
model_choice.change(extend_choices, model_choice, current_models)
|
| 101 |
+
"""
|
| 102 |
"""with gr.Accordion('Group Model selection'):
|
| 103 |
group_model_choice = gr.CheckboxGroup(models_test, label=f' {len(models_test)} different group models', value=1, multiselect=False, max_choices=1, interactive=True, filterable=False)
|
| 104 |
"""
|
| 105 |
with gr.Accordion("test", open=True):
|
| 106 |
group_model_choice = gr.Dropdown(label="test Model", show_label=False, choices=list(models_test) , allow_custom_value=True)
|
| 107 |
+
"""group_model_choice.change(choice_group_a,group_model_choice,model_choice)"""
|
| 108 |
"""group_model_choice.change(choice_group_b,group_model_choice,output)
|
| 109 |
group_model_choice.change(choice_group_c,group_model_choice,current_models)"""
|
| 110 |
with gr.Row():
|