Soumen commited on
Commit
12bc8bb
1 Parent(s): 7f64bfa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -89,13 +89,9 @@ c2, c3 = st.columns([2,1])
89
  def change_photo_state():
90
  st.session_state["photo"]="done"
91
  message = st.text_input("Type your text here!")
92
- camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
93
- @st.cache
94
- def l():
95
  uploaded_photo = c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
96
- return uploaded_photo
97
- uploaded_photo = l()
98
- if st.session_state["photo"]=="done" or message:
99
  if uploaded_photo and uploaded_photo.type=='application/pdf':
100
  tet = read_pdf(uploaded_photo)
101
  # with tempfile.NamedTemporaryFile(delete=False) as temp_file:
 
89
  def change_photo_state():
90
  st.session_state["photo"]="done"
91
  message = st.text_input("Type your text here!")
92
+ if st.session_state["photo"]=="not done" or message:
 
 
93
  uploaded_photo = c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
94
+ camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
 
 
95
  if uploaded_photo and uploaded_photo.type=='application/pdf':
96
  tet = read_pdf(uploaded_photo)
97
  # with tempfile.NamedTemporaryFile(delete=False) as temp_file: