Soumen commited on
Commit
7f64bfa
·
1 Parent(s): ba45265

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -90,7 +90,11 @@ 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
- uploaded_photo = c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
 
 
 
 
94
  if st.session_state["photo"]=="done" or message:
95
  if uploaded_photo and uploaded_photo.type=='application/pdf':
96
  tet = read_pdf(uploaded_photo)
 
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)