Commit
·
15b72a2
1
Parent(s):
5eec800
adding code for displaying df and png
Browse files- app.py +7 -1
- requirements.txt +2 -1
app.py
CHANGED
@@ -10,6 +10,7 @@ import pydicom.datadict as dd
|
|
10 |
import shutil
|
11 |
import papermill as pm
|
12 |
import subprocess
|
|
|
13 |
|
14 |
st.write(os.listdir())
|
15 |
|
@@ -89,5 +90,10 @@ if st.button("Run inference"):
|
|
89 |
)
|
90 |
|
91 |
# show classification results df
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
-
# show image
|
|
|
10 |
import shutil
|
11 |
import papermill as pm
|
12 |
import subprocess
|
13 |
+
from PIL import Image
|
14 |
|
15 |
st.write(os.listdir())
|
16 |
|
|
|
90 |
)
|
91 |
|
92 |
# show classification results df
|
93 |
+
st.write(pd.load_csv('classification_results.df'))
|
94 |
+
|
95 |
+
# show image
|
96 |
+
image_path = 'image_for_classification.png'
|
97 |
+
image = Image.open(image_path).convert('L')
|
98 |
+
st.image(image, caption='input image for classification', use_column_width=True)
|
99 |
|
|
requirements.txt
CHANGED
@@ -14,4 +14,5 @@ matplotlib==3.7.1
|
|
14 |
scikit-learn==1.2.2
|
15 |
sklearn-pandas
|
16 |
numpy==1.25.2
|
17 |
-
git+https://github.com/rordenlab/dcm2niix.git
|
|
|
|
14 |
scikit-learn==1.2.2
|
15 |
sklearn-pandas
|
16 |
numpy==1.25.2
|
17 |
+
git+https://github.com/rordenlab/dcm2niix.git
|
18 |
+
pillow
|