Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,8 +53,10 @@ def load_fn(models):
|
|
| 53 |
load_fn(models)
|
| 54 |
|
| 55 |
tags_plus_models_to_list=[]
|
|
|
|
| 56 |
for tag_plus_m in tags_plus_models:
|
| 57 |
tags_plus_models_to_list.append([tag_plus_m[0],tag_plus_m[2]])
|
|
|
|
| 58 |
|
| 59 |
def test_pass(test):
|
| 60 |
if test==os.getenv('p'):
|
|
@@ -309,9 +311,12 @@ def make_me():
|
|
| 309 |
with gr.Row():
|
| 310 |
nb_images_by_prompt=gr.Number(2,label="Number of images by prompt:",interactive=True)
|
| 311 |
nb_of_models_to_gen=gr.Number(10,label="Number of Models:",interactive=True)
|
| 312 |
-
list_models_in_tag=gr.Dropdown(label="Tag",choices=list(tags_plus_models_to_list),value=tags_plus_models_to_list[1][1])
|
| 313 |
-
index_first_model=gr.Dropdown(label="First model",choices=tags_plus_models_to_list[1][1], type="index")
|
| 314 |
-
list_models_in_tag.change(lambda x:gr.Dropdown(choices=x),list_models_in_tag,index_first_model)
|
|
|
|
|
|
|
|
|
|
| 315 |
with gr.Row():
|
| 316 |
disp_info=gr.Textbox(label="Info")
|
| 317 |
load_info=gr.Button("Load info")
|
|
|
|
| 53 |
load_fn(models)
|
| 54 |
|
| 55 |
tags_plus_models_to_list=[]
|
| 56 |
+
list_tags=[]
|
| 57 |
for tag_plus_m in tags_plus_models:
|
| 58 |
tags_plus_models_to_list.append([tag_plus_m[0],tag_plus_m[2]])
|
| 59 |
+
list_tags.append(tag_plus_m[0])
|
| 60 |
|
| 61 |
def test_pass(test):
|
| 62 |
if test==os.getenv('p'):
|
|
|
|
| 311 |
with gr.Row():
|
| 312 |
nb_images_by_prompt=gr.Number(2,label="Number of images by prompt:",interactive=True)
|
| 313 |
nb_of_models_to_gen=gr.Number(10,label="Number of Models:",interactive=True)
|
| 314 |
+
#list_models_in_tag=gr.Dropdown(label="Tag",choices=list(tags_plus_models_to_list),value=tags_plus_models_to_list[1][1])
|
| 315 |
+
#index_first_model=gr.Dropdown(label="First model",choices=tags_plus_models_to_list[1][1], type="index")
|
| 316 |
+
#list_models_in_tag.change(lambda x:gr.Dropdown(choices=x),list_models_in_tag,index_first_model)
|
| 317 |
+
index_tag=gr.Dropdown(label="Tag",choices=list(list_tags),type="index")
|
| 318 |
+
index_first_model=gr.Dropdown(label="First model",choices=list(tags_plus_models[1][2]), type="index")
|
| 319 |
+
index_tag.change(lambda x:gr.Dropdown(choices=list(tags_plus_models[index_tag][2])),index_tag,index_first_model)
|
| 320 |
with gr.Row():
|
| 321 |
disp_info=gr.Textbox(label="Info")
|
| 322 |
load_info=gr.Button("Load info")
|