Abdelrhman-Elruby commited on
Commit
746951c
1 Parent(s): 66f94b8

modified: main.py

Browse files
Files changed (2) hide show
  1. .gitignore +3 -1
  2. main.py +3 -2
.gitignore CHANGED
@@ -1 +1,3 @@
1
- 2class_98.0.h5
 
 
 
1
+ 2class_98.0.h5
2
+ *.jpeg
3
+ *.png
main.py CHANGED
@@ -94,7 +94,7 @@ def home_page():
94
  st.title('Brain Tumor Detection')
95
  st.session_state.image=st.file_uploader('Upload MRI Image',accept_multiple_files=False,type=['png', 'jpg','jpeg'],key="upload",on_change=update_photo)
96
  if st.session_state.image != None:
97
- st.image(st.session_state.image,width=300)
98
  col,col2=st.columns([2,3])
99
  radio=col.radio("Model",options=('Brain Tumor Detection','Alzheimer Detection'),key='radio',on_change=update_radio)
100
  check=col.checkbox('Show Prediction Scores',key='check',on_change=update_check)
@@ -109,7 +109,8 @@ def home_page():
109
  f.write(st.session_state.image.getbuffer())
110
  f.close()
111
 
112
- col2.table(pred(st.session_state.image.name,radio,selbox,check).style.highlight_max(axis=0))
 
113
 
114
 
115
 
 
94
  st.title('Brain Tumor Detection')
95
  st.session_state.image=st.file_uploader('Upload MRI Image',accept_multiple_files=False,type=['png', 'jpg','jpeg'],key="upload",on_change=update_photo)
96
  if st.session_state.image != None:
97
+ st.image(st.session_state.image,width=150)
98
  col,col2=st.columns([2,3])
99
  radio=col.radio("Model",options=('Brain Tumor Detection','Alzheimer Detection'),key='radio',on_change=update_radio)
100
  check=col.checkbox('Show Prediction Scores',key='check',on_change=update_check)
 
109
  f.write(st.session_state.image.getbuffer())
110
  f.close()
111
 
112
+ with st.spinner('Model Running....'):
113
+ col2.table(pred(st.session_state.image.name,radio,selbox,check).style.highlight_max(axis=0))
114
 
115
 
116