Adrit Rao commited on
Commit
81b9c1f
1 Parent(s): 4ae0554

Add application file v2

Browse files
Files changed (1) hide show
  1. app.py +8 -16
app.py CHANGED
@@ -5,24 +5,16 @@ import zipfile
5
  import os
6
  import subprocess
7
 
8
- # Define the list of commands, including "echo" to simulate Enter keypress
9
- commands = [
10
- "chmod +x install.sh"
11
- ]
12
-
13
- for command in commands:
14
- try:
15
- subprocess.run(command, shell=True, check=True)
16
- except subprocess.CalledProcessError as e:
17
- print(f"Error running the command: {e}")
18
 
 
 
19
 
20
- # Run the commands
21
- for command in commands:
22
- try:
23
- subprocess.run(command, shell=True, check=True, text=True)
24
- except subprocess.CalledProcessError as e:
25
- print(f"Error running the command: {e}")
26
 
27
  # Streamlit app title
28
  st.title("DICOM Image Viewer")
 
5
  import os
6
  import subprocess
7
 
8
+ import subprocess
 
 
 
 
 
 
 
 
 
9
 
10
+ # Command to make the script executable
11
+ command = "chmod +x install.sh"
12
 
13
+ try:
14
+ subprocess.run(command, shell=True, check=True)
15
+ print("Script 'install.sh' has been made executable.")
16
+ except subprocess.CalledProcessError as e:
17
+ print(f"Error while making the script executable: {e}")
 
18
 
19
  # Streamlit app title
20
  st.title("DICOM Image Viewer")