davron04 commited on
Commit
d368912
·
verified ·
1 Parent(s): 184d3f9

Update main_view.py

Browse files
Files changed (1) hide show
  1. main_view.py +9 -8
main_view.py CHANGED
@@ -14,7 +14,7 @@ class Main_View:
14
  st.divider()
15
 
16
  image_input = 'test_image.jpg'
17
- image_output = 'test_image_pred.png'
18
 
19
  col1_img, col2_img = st.columns(2,gap='medium')
20
  with col1_img:
@@ -23,10 +23,11 @@ class Main_View:
23
  st.image(image_output, caption="Prediction", use_container_width=True)
24
 
25
  st.divider()
26
- col1_button, col2_button = st.columns(2,gap='medium',vertical_alignment='center')
27
- with col1_button:
28
- if st.button("Image Upload", key='main_upload', icon = ':material/upload_file:', type = 'secondary'):
29
- self.app.change_page("Upload")
30
- with col2_button:
31
- if st.button("Real time detection", key='main_camera', icon = ':material/photo_camera:', type='primary'):
32
- self.app.change_page("Camera")
 
 
14
  st.divider()
15
 
16
  image_input = 'test_image.jpg'
17
+ image_output = 'test_image_pred.PNG'
18
 
19
  col1_img, col2_img = st.columns(2,gap='medium')
20
  with col1_img:
 
23
  st.image(image_output, caption="Prediction", use_container_width=True)
24
 
25
  st.divider()
26
+ if st.session_state.page == "Main":
27
+ col1_button, col2_button = st.columns(2,gap='medium',vertical_alignment='center')
28
+ with col1_button:
29
+ if st.button("Image Upload", key='main_upload', icon = ':material/upload_file:', type = 'secondary'):
30
+ self.app.change_page("Upload")
31
+ with col2_button:
32
+ if st.button("Real time detection", key='main_camera', icon = ':material/photo_camera:', type='primary'):
33
+ self.app.change_page("Camera")