Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,6 +58,10 @@ def extend_choices(choices):
|
|
| 58 |
return choices + (nb_models - len(choices)) * ['NA']
|
| 59 |
"""return choices + (num_models - len(choices)) * ['NA']"""
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
def update_imgbox(choices):
|
| 62 |
choices_plus = extend_choices(choices)
|
| 63 |
return [gr.Image(None, label=m, visible=(m != 'NA')) for m in choices_plus]
|
|
@@ -121,7 +125,7 @@ def make_me():
|
|
| 121 |
"""output = [gr.Image(label=m, min_width=170, height=170) for m in choices]
|
| 122 |
current_models = [gr.Textbox(m, visible=False) for m in choices]"""
|
| 123 |
output = update_imgbox([choices[0][0]])
|
| 124 |
-
current_models =
|
| 125 |
|
| 126 |
for m, o in zip(current_models, output):
|
| 127 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
|
|
|
| 58 |
return choices + (nb_models - len(choices)) * ['NA']
|
| 59 |
"""return choices + (num_models - len(choices)) * ['NA']"""
|
| 60 |
|
| 61 |
+
def extend_choices_b(choices):
|
| 62 |
+
choices_plus = extend_choices(choices)
|
| 63 |
+
return [gr.Textbox(m, visible=False) for m in choices_plus]
|
| 64 |
+
|
| 65 |
def update_imgbox(choices):
|
| 66 |
choices_plus = extend_choices(choices)
|
| 67 |
return [gr.Image(None, label=m, visible=(m != 'NA')) for m in choices_plus]
|
|
|
|
| 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][0]])
|
| 128 |
+
current_models = extend_choices_b([choices[0][0]])
|
| 129 |
|
| 130 |
for m, o in zip(current_models, output):
|
| 131 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|