Spaces:
Sleeping
Sleeping
acharyaaditya26
commited on
Commit
•
05f8689
1
Parent(s):
fda01db
Update app.py
Browse files
app.py
CHANGED
@@ -101,7 +101,7 @@ def cleanup_old_files():
|
|
101 |
current_time = time.time()
|
102 |
for folder in [UPLOAD_FOLDER, RESULTS_FOLDER]:
|
103 |
for file_path in Path(folder).glob('*'):
|
104 |
-
if current_time - file_path.stat().st_mtime
|
105 |
file_path.unlink()
|
106 |
|
107 |
cleanup_old_files()
|
|
|
101 |
current_time = time.time()
|
102 |
for folder in [UPLOAD_FOLDER, RESULTS_FOLDER]:
|
103 |
for file_path in Path(folder).glob('*'):
|
104 |
+
if current_time - file_path.stat().st_mtime > 3600: # 1 hour
|
105 |
file_path.unlink()
|
106 |
|
107 |
cleanup_old_files()
|