Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,21 +30,21 @@ if uploaded_zip_file is not None:
|
|
30 |
try:
|
31 |
# Create a temporary directory to unzip the files
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
temp_dir = "temp_dicom_dir"
|
48 |
|
49 |
os.makedirs(temp_dir, exist_ok=True)
|
50 |
full_path = os.path.abspath(temp_dir)
|
|
|
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)
|
36 |
+
print("Script 'install.sh' has been made executable.")
|
37 |
+
except subprocess.CalledProcessError as e:
|
38 |
+
print(f"Error while making the script executable: {e}")
|
39 |
+
|
40 |
+
command = "./install.sh"
|
41 |
+
try:
|
42 |
+
subprocess.run(command, shell=True, check=True)
|
43 |
+
print("Script 'install.sh' has started running.")
|
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)
|