srinuksv commited on
Commit
941db60
1 Parent(s): cd5729a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -10
app.py CHANGED
@@ -1,14 +1,18 @@
1
- import zipfile
2
  import os
3
 
4
- # Path to the zip file
5
- zip_file = 'SRUNU.zip'
 
6
 
7
- # Directory to extract to (current directory in this case)
8
- extract_dir = './'
 
 
 
 
9
 
10
- # Open and extract the zip file
11
- with zipfile.ZipFile(zip_file, 'r') as zip_ref:
12
- zip_ref.extractall(extract_dir)
13
-
14
- print(f'Files extracted to {os.path.abspath(extract_dir)}')
 
 
1
  import os
2
 
3
+ # Define the paths for the directories
4
+ db_dir = 'db'
5
+ data_dir = 'data'
6
 
7
+ # Check if the directories already exist
8
+ if not os.path.exists(db_dir):
9
+ os.makedirs(db_dir)
10
+ print(f"Directory '{db_dir}' created successfully.")
11
+ else:
12
+ print(f"Directory '{db_dir}' already exists.")
13
 
14
+ if not os.path.exists(data_dir):
15
+ os.makedirs(data_dir)
16
+ print(f"Directory '{data_dir}' created successfully.")
17
+ else:
18
+ print(f"Directory '{data_dir}' already exists.")