DemiPoto commited on
Commit
79bc957
1 Parent(s): 8d31dd3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -322,10 +322,11 @@ def reset_cache_image_actu(id,cache_image_actu=cache_image_actu):
322
  def reset_cache_image_all_sessions(cache_image=cache_image):
323
  cache_image.clear()
324
  return
325
- def set_session(id_session,cache_image,cache_image_actu):
326
- print(f"id = {id_session}")
327
- cache_image[f"{id_session}"]=[]
328
- cache_image_actu[f"{id_session}"]=[]
 
329
  return
330
 
331
  def disp_models(group_model_choice,nb_rep=nb_rep):
@@ -445,7 +446,7 @@ def make_me():
445
  b22 = gr.Button('Reset Gallery All')
446
  b11.click(load_gallery_actu,[gallery,id_session],gallery)
447
  b12.click(load_gallery,[gallery,id_session],gallery)
448
- b21.click(reset_gallery,[gallery,id_session],gallery)
449
  b22.click(reset_cache_image,[id_session],gallery)
450
  for m, o in zip(current_models_g, output_g):
451
  #o.change(add_gallery, [o, m, gallery], [gallery])
 
322
  def reset_cache_image_all_sessions(cache_image=cache_image):
323
  cache_image.clear()
324
  return
325
+ def set_session(id,cache_image,cache_image_actu):
326
+ print(f"id = {id}")
327
+ cache_image[f"{id}"]=[]
328
+ cache_image_actu[f"{id}"]=[]
329
+ print(cache_image)
330
  return
331
 
332
  def disp_models(group_model_choice,nb_rep=nb_rep):
 
446
  b22 = gr.Button('Reset Gallery All')
447
  b11.click(load_gallery_actu,[gallery,id_session],gallery)
448
  b12.click(load_gallery,[gallery,id_session],gallery)
449
+ b21.click(reset_gallery,[gallery],gallery)
450
  b22.click(reset_cache_image,[id_session],gallery)
451
  for m, o in zip(current_models_g, output_g):
452
  #o.change(add_gallery, [o, m, gallery], [gallery])