Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -395,11 +395,11 @@ def fonc_start(id_session,id_module,s,cont):
|
|
| 395 |
print("image saved\n")
|
| 396 |
else:
|
| 397 |
print("fail to generate\n")
|
| 398 |
-
|
| 399 |
for model_plus_tasks in cache_list_task[f"{id_session}"]:
|
| 400 |
for task in model_plus_tasks["task"]:
|
| 401 |
-
|
| 402 |
-
print(f"\n {
|
| 403 |
return result , gr.Textbox(s+"1")
|
| 404 |
|
| 405 |
def fonc_init(s):
|
|
@@ -417,7 +417,7 @@ def index_gallery_prev(i,list_models):
|
|
| 417 |
def change_text_model_actu_gal(list_models,index):
|
| 418 |
return gr.Textbox(f"{list_models[index]}")
|
| 419 |
def fonc_add_to_text(text,list_models,index):
|
| 420 |
-
return gr.Textbox(f"\"{list_models[index]}\",\n")
|
| 421 |
|
| 422 |
def make_me():
|
| 423 |
with gr.Column():
|
|
@@ -550,7 +550,7 @@ def make_me():
|
|
| 550 |
with gr.Column():
|
| 551 |
button_add_to_fav=gr.Button("Add to Favlist")
|
| 552 |
text_fav=gr.Textbox(label='Favlist', lines=5, interactive = True)
|
| 553 |
-
|
| 554 |
|
| 555 |
|
| 556 |
|
|
|
|
| 395 |
print("image saved\n")
|
| 396 |
else:
|
| 397 |
print("fail to generate\n")
|
| 398 |
+
num_task_to_do=0
|
| 399 |
for model_plus_tasks in cache_list_task[f"{id_session}"]:
|
| 400 |
for task in model_plus_tasks["task"]:
|
| 401 |
+
num_task_to_do+=1
|
| 402 |
+
print(f"\n {num_task_to_do} tasks to do\n")
|
| 403 |
return result , gr.Textbox(s+"1")
|
| 404 |
|
| 405 |
def fonc_init(s):
|
|
|
|
| 417 |
def change_text_model_actu_gal(list_models,index):
|
| 418 |
return gr.Textbox(f"{list_models[index]}")
|
| 419 |
def fonc_add_to_text(text,list_models,index):
|
| 420 |
+
return gr.Textbox(text+f"\"{list_models[index]}\",\n")
|
| 421 |
|
| 422 |
def make_me():
|
| 423 |
with gr.Column():
|
|
|
|
| 550 |
with gr.Column():
|
| 551 |
button_add_to_fav=gr.Button("Add to Favlist")
|
| 552 |
text_fav=gr.Textbox(label='Favlist', lines=5, interactive = True)
|
| 553 |
+
button_add_to_fav.click(fonc_add_to_text,[text_fav,list_models_to_gen,index_gallery],[text_fav])
|
| 554 |
|
| 555 |
|
| 556 |
|