lehduong commited on
Commit
002ecf1
1 Parent(s): 00ec300

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -375,6 +375,8 @@ def update_denoise_checkboxes(images_state: List[Image.Image], task_type: str, a
375
 
376
  return gr.update(choices=labels, value=values)
377
  else:
 
 
378
  labels = ["image_0"] + [f"image_{i+1}" for i in range(len(images_state))]
379
  values = ["image_0"]
380
  return gr.update(choices=labels, value=values)
 
375
 
376
  return gr.update(choices=labels, value=values)
377
  else:
378
+ if images_state is None:
379
+ images_state = []
380
  labels = ["image_0"] + [f"image_{i+1}" for i in range(len(images_state))]
381
  values = ["image_0"]
382
  return gr.update(choices=labels, value=values)