Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -267,8 +267,21 @@ def fonc_del_param(lp,txt_input,neg_input,width,height,steps,cfg,seed):
|
|
267 |
lp.append(["","",0,0,0,0,-1])
|
268 |
return gr.Dataset(samples=lp) , gr.Dropdown(choices=[["a",lp]], value=lp)
|
269 |
|
270 |
-
def fonc_load_info(
|
271 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
|
273 |
def make_me():
|
274 |
with gr.Column():
|
@@ -320,7 +333,7 @@ def make_me():
|
|
320 |
with gr.Row():
|
321 |
disp_info=gr.Textbox(label="Info")
|
322 |
load_info=gr.Button("Load info")
|
323 |
-
load_info.click(fonc_load_info,[nb_of_models_to_gen,index_first_model],[disp_info])
|
324 |
|
325 |
js_code = """
|
326 |
|
|
|
267 |
lp.append(["","",0,0,0,0,-1])
|
268 |
return gr.Dataset(samples=lp) , gr.Dropdown(choices=[["a",lp]], value=lp)
|
269 |
|
270 |
+
def fonc_load_info(nb_of_models_to_gen,index_tag,index_first_model):
|
271 |
+
str_temp=""
|
272 |
+
if index_first_model+nb_of_models_to_gen>len(tags_plus_models[index_tag][2])-1:
|
273 |
+
if nb_of_models_to_gen>len(tags_plus_models[index_tag][2])-1:
|
274 |
+
str_temp+="warning : to many model chosen"
|
275 |
+
else:
|
276 |
+
str_temp+="warning : first model to close to the last model"
|
277 |
+
nb_of_models_to_gen= len(tags_plus_models[index_tag][2])-1-index_first_model
|
278 |
+
str_temp+=f" - only {nb_of_models_to_gen} will be use\n\n"
|
279 |
+
str_temp+="list of models use: (from "
|
280 |
+
str_temp+=f"{index_first_model+1}/{len(tags_plus_models[index_tag][2])} to {index_first_model+nb_of_models_to_gen+1}/{len(tags_plus_models[index_tag][2])})\n"
|
281 |
+
for i in range(nb_of_models_to_gen):
|
282 |
+
str+=f"{tags_plus_models[index_tag][2][i-1+index_first_model]}\n"
|
283 |
+
|
284 |
+
return nb_of_models_to_gen,gr.Textbox(str_temp)
|
285 |
|
286 |
def make_me():
|
287 |
with gr.Column():
|
|
|
333 |
with gr.Row():
|
334 |
disp_info=gr.Textbox(label="Info")
|
335 |
load_info=gr.Button("Load info")
|
336 |
+
load_info.click(fonc_load_info,[nb_of_models_to_gen,index_tag,index_first_model],[nb_of_models_to_gen,disp_info])
|
337 |
|
338 |
js_code = """
|
339 |
|