Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,6 @@ load_fn(models)
|
|
22 |
|
23 |
num_models = 4
|
24 |
default_models = models[:num_models]
|
25 |
-
#current_models = default_models
|
26 |
|
27 |
|
28 |
|
@@ -42,11 +41,6 @@ def gen_fn(model_str, prompt):
|
|
42 |
return models_load[model_str](f'{prompt} {noise}')
|
43 |
|
44 |
|
45 |
-
def gen_fn2(choices, prompt):
|
46 |
-
choices_plus = extend_choices(choices)
|
47 |
-
return [gen_fn(m, prompt) for m in choices_plus]
|
48 |
-
|
49 |
-
|
50 |
|
51 |
with gr.Blocks() as demo:
|
52 |
with gr.Tab('Multiple models'):
|
@@ -66,12 +60,6 @@ with gr.Blocks() as demo:
|
|
66 |
for m, o in zip(current_models, output):
|
67 |
gen_button.click(gen_fn, [m, txt_input], o)
|
68 |
|
69 |
-
#gen_button.click(gen_fn2, [model_choice, txt_input], output, batch = True, max_batch_size = num_models)
|
70 |
-
|
71 |
-
'''
|
72 |
-
output = gr.Gallery()
|
73 |
-
gen_button.click(lambda models, txt: [gen_fn(m, txt) for m in models], [model_choice, txt_input], output)
|
74 |
-
'''
|
75 |
|
76 |
with gr.Tab('Single model'):
|
77 |
model_choice2 = gr.Dropdown(models, label = 'Choose model', value = models[0], filterable = False)
|
|
|
22 |
|
23 |
num_models = 4
|
24 |
default_models = models[:num_models]
|
|
|
25 |
|
26 |
|
27 |
|
|
|
41 |
return models_load[model_str](f'{prompt} {noise}')
|
42 |
|
43 |
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
with gr.Blocks() as demo:
|
46 |
with gr.Tab('Multiple models'):
|
|
|
60 |
for m, o in zip(current_models, output):
|
61 |
gen_button.click(gen_fn, [m, txt_input], o)
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
with gr.Tab('Single model'):
|
65 |
model_choice2 = gr.Dropdown(models, label = 'Choose model', value = models[0], filterable = False)
|