Delete app.py
Browse files
app.py
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
import zipfile
|
3 |
-
import os
|
4 |
-
|
5 |
-
# Function to unzip the 'cspc_db.zip' file and save it in the 'cspc_db' folder
|
6 |
-
def unzip_file(zip_file_path, extract_to_path):
|
7 |
-
# Check if the destination directory exists, and if not, create it
|
8 |
-
if not os.path.exists(extract_to_path):
|
9 |
-
os.makedirs(extract_to_path)
|
10 |
-
|
11 |
-
# Unzip the file
|
12 |
-
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
13 |
-
zip_ref.extractall(extract_to_path)
|
14 |
-
|
15 |
-
st.success(f"Files have been extracted to: {extract_to_path}")
|
16 |
-
|
17 |
-
# Define the path for the zip file and the extraction folder
|
18 |
-
zip_file_path = "cspc_db.zip"
|
19 |
-
extract_to_path = "cspc_db"
|
20 |
-
|
21 |
-
# Add a button to trigger the unzip process
|
22 |
-
if st.button('Unzip CSPC Database'):
|
23 |
-
unzip_file(zip_file_path, extract_to_path)
|
24 |
-
st.write(f"Unzipped files are available in the '{extract_to_path}' folder.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|