Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,7 +54,6 @@ load_fn(models)"""
|
|
| 54 |
|
| 55 |
|
| 56 |
def extend_choices(choices):
|
| 57 |
-
nb_models
|
| 58 |
return choices + (nb_models - len(choices)) * ['NA']
|
| 59 |
"""return choices + (num_models - len(choices)) * ['NA']"""
|
| 60 |
|
|
@@ -75,7 +74,8 @@ def choice_group_a(group_model_choice):
|
|
| 75 |
|
| 76 |
def choice_group_b(group_model_choice):
|
| 77 |
choice=choice_group_a(group_model_choice)
|
| 78 |
-
return [gr.Image(label=m, min_width=170, height=170) for m in choice]
|
|
|
|
| 79 |
|
| 80 |
def choice_group_c(group_model_choice):
|
| 81 |
choice=choice_group_a(group_model_choice)
|
|
@@ -124,8 +124,8 @@ def make_me():
|
|
| 124 |
choices=models_test[0]
|
| 125 |
"""output = [gr.Image(label=m, min_width=170, height=170) for m in choices]
|
| 126 |
current_models = [gr.Textbox(m, visible=False) for m in choices]"""
|
| 127 |
-
output = update_imgbox([choices[0]
|
| 128 |
-
current_models = extend_choices_b([choices[0]
|
| 129 |
|
| 130 |
for m, o in zip(current_models, output):
|
| 131 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
|
|
|
| 54 |
|
| 55 |
|
| 56 |
def extend_choices(choices):
|
|
|
|
| 57 |
return choices + (nb_models - len(choices)) * ['NA']
|
| 58 |
"""return choices + (num_models - len(choices)) * ['NA']"""
|
| 59 |
|
|
|
|
| 74 |
|
| 75 |
def choice_group_b(group_model_choice):
|
| 76 |
choice=choice_group_a(group_model_choice)
|
| 77 |
+
"""return [gr.Image(label=m, min_width=170, height=170) for m in choice]"""
|
| 78 |
+
return [gr.Image(None, label=m, visible=(m != 'NA')) for m in choice]
|
| 79 |
|
| 80 |
def choice_group_c(group_model_choice):
|
| 81 |
choice=choice_group_a(group_model_choice)
|
|
|
|
| 124 |
choices=models_test[0]
|
| 125 |
"""output = [gr.Image(label=m, min_width=170, height=170) for m in choices]
|
| 126 |
current_models = [gr.Textbox(m, visible=False) for m in choices]"""
|
| 127 |
+
output = update_imgbox([choices[0]])
|
| 128 |
+
current_models = extend_choices_b([choices[0]])
|
| 129 |
|
| 130 |
for m, o in zip(current_models, output):
|
| 131 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|