Update app.py
Browse files
app.py
CHANGED
@@ -86,13 +86,13 @@ st.title("Bangla and English Summarizer: Upload Images/Pdf or input texts to sum
|
|
86 |
#st.subheader("Input texts to summarize: ")
|
87 |
#@st.cache_resource(experimental_allow_widgets=True)
|
88 |
""" NLP Based Application with Streamlit """
|
|
|
|
|
89 |
def change_photo_state():
|
90 |
st.session_state["photo"]="done"
|
91 |
message = st.text_input("Type your text here!")
|
92 |
uploaded_photo = st.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
|
93 |
camera_photo = st.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
|
94 |
-
if "photo" not in st.session_state:
|
95 |
-
st.session_state["photo"]="not done"
|
96 |
if st.session_state["photo"]=="done" or message:
|
97 |
if uploaded_photo and uploaded_photo.type=='application/pdf':
|
98 |
tet = read_pdf(uploaded_photo)
|
|
|
86 |
#st.subheader("Input texts to summarize: ")
|
87 |
#@st.cache_resource(experimental_allow_widgets=True)
|
88 |
""" NLP Based Application with Streamlit """
|
89 |
+
if "photo" not in st.session_state:
|
90 |
+
st.session_state["photo"]="not done"
|
91 |
def change_photo_state():
|
92 |
st.session_state["photo"]="done"
|
93 |
message = st.text_input("Type your text here!")
|
94 |
uploaded_photo = st.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
|
95 |
camera_photo = st.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
|
|
|
|
|
96 |
if st.session_state["photo"]=="done" or message:
|
97 |
if uploaded_photo and uploaded_photo.type=='application/pdf':
|
98 |
tet = read_pdf(uploaded_photo)
|