Vision-CAIR commited on
Commit
0947807
1 Parent(s): 47ad041

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -387,9 +387,10 @@ def gradio_reset(chat_state, img_list, path_list):
387
  chat_state.messages = []
388
  if img_list is not None:
389
  img_list = []
390
- for path in path_list:
391
- os.remove(path)
392
- path_list.clear()
 
393
  return None, gr.update(value=None, interactive=True), gr.update(placeholder='Upload your image and chat',
394
  interactive=True), chat_state, img_list
395
 
 
387
  chat_state.messages = []
388
  if img_list is not None:
389
  img_list = []
390
+ if isinstance(path_list, list):
391
+ for path in path_list:
392
+ os.remove(path)
393
+ path_list.clear()
394
  return None, gr.update(value=None, interactive=True), gr.update(placeholder='Upload your image and chat',
395
  interactive=True), chat_state, img_list
396