DemiPoto commited on
Commit
0028ffd
·
verified ·
1 Parent(s): 6fb1d67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -322,12 +322,6 @@ 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,cache_image=cache_image,cache_image_actu=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):
333
  listTemp=[]
@@ -434,9 +428,9 @@ def make_me():
434
  #global cache_image
435
  #global cache_image_actu
436
  id_session=gr.Number(visible=False,value=randint(1,MAX_SEED))
437
- id_session.change(set_session,[id_session],[])
438
- print(id_session.value)
439
- id_session=gr.Number(visible=False,value=randint(1,MAX_SEED))
440
  with gr.Column():
441
  b11 = gr.Button('Load Galerry Actu')
442
  b12 = gr.Button('Load Galerry All')
 
322
  def reset_cache_image_all_sessions(cache_image=cache_image):
323
  cache_image.clear()
324
  return
 
 
 
 
 
 
325
 
326
  def disp_models(group_model_choice,nb_rep=nb_rep):
327
  listTemp=[]
 
428
  #global cache_image
429
  #global cache_image_actu
430
  id_session=gr.Number(visible=False,value=randint(1,MAX_SEED))
431
+ cache_image[f"{id_session.value}"]=[]
432
+ cache_image_actu[f"{id_session.value}"]=[]
433
+ print(cache_image)
434
  with gr.Column():
435
  b11 = gr.Button('Load Galerry Actu')
436
  b12 = gr.Button('Load Galerry All')