Pavan2k4 commited on
Commit
bb55ca1
·
verified ·
1 Parent(s): bc563e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -259,13 +259,13 @@ def upload_page():
259
  print(f"Error in upload_page: {str(e)}") # This will appear in the Streamlit logs
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:
 
259
  print(f"Error in upload_page: {str(e)}") # This will appear in the Streamlit logs
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: