Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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)
|