Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,6 +30,13 @@ if uploaded_zip_file is not None:
|
|
30 |
try:
|
31 |
# Create a temporary directory to unzip the files
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
command = "chmod +x install.sh"
|
34 |
try:
|
35 |
subprocess.run(command, shell=True, check=True)
|
@@ -44,12 +51,6 @@ if uploaded_zip_file is not None:
|
|
44 |
except subprocess.CalledProcessError as e:
|
45 |
print(f"Error while running the script: {e}")
|
46 |
|
47 |
-
temp_dir = "/home/user/app/Comp2Comp/temp_dicom_dir"
|
48 |
-
|
49 |
-
os.makedirs(temp_dir, exist_ok=True)
|
50 |
-
full_path = os.path.abspath(temp_dir)
|
51 |
-
|
52 |
-
st.write(f"Temporary directory path: {full_path}")
|
53 |
|
54 |
with zipfile.ZipFile(uploaded_zip_file, "r") as zip_ref:
|
55 |
zip_ref.extractall(temp_dir)
|
|
|
30 |
try:
|
31 |
# Create a temporary directory to unzip the files
|
32 |
|
33 |
+
temp_dir = "/home/user/app/Comp2Comp/temp_dicom_dir"
|
34 |
+
|
35 |
+
os.makedirs(temp_dir, exist_ok=True)
|
36 |
+
full_path = os.path.abspath(temp_dir)
|
37 |
+
|
38 |
+
st.write(f"Temporary directory path: {full_path}")
|
39 |
+
|
40 |
command = "chmod +x install.sh"
|
41 |
try:
|
42 |
subprocess.run(command, shell=True, check=True)
|
|
|
51 |
except subprocess.CalledProcessError as e:
|
52 |
print(f"Error while running the script: {e}")
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
with zipfile.ZipFile(uploaded_zip_file, "r") as zip_ref:
|
56 |
zip_ref.extractall(temp_dir)
|