AdritRao commited on
Commit
71e834b
·
verified ·
1 Parent(s): ff4d8cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -99,13 +99,13 @@ if st.button("Analyze"):
99
  outputs_directory = "/home/user/app/C2C/outputs"
100
 
101
  def clear_directory(directory):
102
- if os.path.exists(directory):
103
- for item_name in os.listdir(directory):
104
- item_path = os.path.join(directory, item_name)
105
- if os.path.isfile(item_path):
106
- os.remove(item_path)
107
- elif os.path.isdir(item_path):
108
- shutil.rmtree(item_path)
109
  clear_directory(outputs_directory)
110
 
111
 
 
99
  outputs_directory = "/home/user/app/C2C/outputs"
100
 
101
  def clear_directory(directory):
102
+ if os.path.exists(directory):
103
+ for item_name in os.listdir(directory):
104
+ item_path = os.path.join(directory, item_name)
105
+ if os.path.isfile(item_path):
106
+ os.remove(item_path)
107
+ elif os.path.isdir(item_path):
108
+ shutil.rmtree(item_path)
109
  clear_directory(outputs_directory)
110
 
111