lydiazyang commited on
Commit
f2b0cde
·
1 Parent(s): 783d9f8

Add back button

Browse files
Files changed (1) hide show
  1. index.py +2 -1
index.py CHANGED
@@ -18,10 +18,11 @@ def main():
18
  option4 = st.sidebar.checkbox('Orange Juice')
19
  option5 = st.sidebar.checkbox('Almond Milk')
20
  button_clicked = st.sidebar.button('Done')
 
21
  if button_clicked:
22
  displayRecipes()
23
 
24
- if not button_clicked:
25
  # Create a VideoCapture object to access the webcam
26
  cap = cv2.VideoCapture(0)
27
 
 
18
  option4 = st.sidebar.checkbox('Orange Juice')
19
  option5 = st.sidebar.checkbox('Almond Milk')
20
  button_clicked = st.sidebar.button('Done')
21
+ back_button_clicked = st.button('Camera')
22
  if button_clicked:
23
  displayRecipes()
24
 
25
+ if not button_clicked or back_button_clicked:
26
  # Create a VideoCapture object to access the webcam
27
  cap = cv2.VideoCapture(0)
28