Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -260,12 +260,12 @@ def upload_page():
|
|
| 260 |
|
| 261 |
for filename in os.listdir(PATCHES_DIR):
|
| 262 |
file_path = os.path.join(PATCHES_DIR, filename)
|
| 263 |
-
|
| 264 |
-
|
| 265 |
for filename in os.listdir(PRED_PATCHES_DIR):
|
| 266 |
file_path = os.path.join(PRED_PATCHES_DIR, filename)
|
| 267 |
-
|
| 268 |
-
|
| 269 |
|
| 270 |
if st.session_state.file_uploaded and st.button('View result'):
|
| 271 |
if st.session_state.filename is None:
|
|
|
|
| 260 |
|
| 261 |
for filename in os.listdir(PATCHES_DIR):
|
| 262 |
file_path = os.path.join(PATCHES_DIR, filename)
|
| 263 |
+
if os.path.isfile(file_path):
|
| 264 |
+
os.remove(file_path)
|
| 265 |
for filename in os.listdir(PRED_PATCHES_DIR):
|
| 266 |
file_path = os.path.join(PRED_PATCHES_DIR, filename)
|
| 267 |
+
if os.path.isfile(file_path):
|
| 268 |
+
os.remove(file_path)
|
| 269 |
|
| 270 |
if st.session_state.file_uploaded and st.button('View result'):
|
| 271 |
if st.session_state.filename is None:
|