AdritRao commited on
Commit
0842cd8
·
1 Parent(s): db2e339

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -15
app.py CHANGED
@@ -30,24 +30,26 @@ 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)
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 = "/Comp2Comp/temp_dicom_dir"
 
48
  os.makedirs(temp_dir, exist_ok=True)
 
49
 
50
- st.write(f"Temporary directory path: {temp_dir}")
51
 
52
  with zipfile.ZipFile(uploaded_zip_file, "r") as zip_ref:
53
  zip_ref.extractall(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 = "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)