model2 commited on
Commit
c135610
·
1 Parent(s): e1d5d34

clean up tmp dir after each run

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -202,7 +202,7 @@ def clear_tmp_directory():
202
  image_extensions = {'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp'}
203
  for root, dirs, files in os.walk('/tmp'):
204
  for file in files:
205
- if not file.startswith('advance-blurred-'):
206
  ext = os.path.splitext(file)[1].lower()
207
  if ext in image_extensions:
208
  full_path = os.path.join(root, file)
 
202
  image_extensions = {'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp'}
203
  for root, dirs, files in os.walk('/tmp'):
204
  for file in files:
205
+ if not file.startswith('advance-blurred-') and not file.startswith('before.jpg') and not file.startswith('after.jpg'):
206
  ext = os.path.splitext(file)[1].lower()
207
  if ext in image_extensions:
208
  full_path = os.path.join(root, file)