Soumen commited on
Commit
cbcd024
1 Parent(s): bc59b95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -97,11 +97,13 @@ def main():
97
  with st.container():
98
  c1, c2, c3 = st.columns([2,2,1])
99
  message = c1.text_input("Type your text here!")
100
- if c2.button("CaptureImage"):
 
 
 
101
  camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
102
- #st.image(camera_photo, caption='Uploaded Image', use_column_width=True)
103
- if c2.button("Stop camera"):
104
- CaptureImage =False
105
  uploaded_photo = c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
106
  if st.session_state["photo"]=="done" or message:
107
  if uploaded_photo and uploaded_photo.type=='application/pdf':
 
97
  with st.container():
98
  c1, c2, c3 = st.columns([2,2,1])
99
  message = c1.text_input("Type your text here!")
100
+ Capture = True
101
+ if c2.button("Stop Camera"):
102
+ Capture =False
103
+ if capture:
104
  camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
105
+ st.image(camera_photo, caption='Uploaded Image', use_column_width=True)
106
+
 
107
  uploaded_photo = c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
108
  if st.session_state["photo"]=="done" or message:
109
  if uploaded_photo and uploaded_photo.type=='application/pdf':