Spaces:
Sleeping
Sleeping
Adrit Rao
commited on
Commit
•
e665ab2
1
Parent(s):
2033578
Add application file
Browse files
app.py
CHANGED
@@ -3,6 +3,25 @@ import pydicom
|
|
3 |
import matplotlib.pyplot as plt
|
4 |
import zipfile
|
5 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
# Streamlit app title
|
8 |
st.title("DICOM Image Viewer")
|
|
|
3 |
import matplotlib.pyplot as plt
|
4 |
import zipfile
|
5 |
import os
|
6 |
+
import subprocess
|
7 |
+
|
8 |
+
# Define the commands
|
9 |
+
commands = [
|
10 |
+
"wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh",
|
11 |
+
"bash miniconda.sh",
|
12 |
+
"conda init",
|
13 |
+
"cd Comp2Comp-main",
|
14 |
+
"conda create -n c2c_env python=3.8",
|
15 |
+
"conda activate c2c_env",
|
16 |
+
"pip install -e ."
|
17 |
+
]
|
18 |
+
|
19 |
+
# Run the commands
|
20 |
+
for command in commands:
|
21 |
+
try:
|
22 |
+
subprocess.run(command, shell=True, check=True, text=True)
|
23 |
+
except subprocess.CalledProcessError as e:
|
24 |
+
print(f"Error running the command: {e}")
|
25 |
|
26 |
# Streamlit app title
|
27 |
st.title("DICOM Image Viewer")
|