Spaces:
Running
on
Zero
Running
on
Zero
clean up tmp dir after each run
Browse files
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)
|