Update app.py
Browse files
app.py
CHANGED
@@ -103,7 +103,7 @@ def main():
|
|
103 |
uploaded_photo = st.file_uploader("Upload Image, Containing English or Bangla texts",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
|
104 |
if "photo" not in st.session_state:
|
105 |
st.session_state["photo"]="not done"
|
106 |
-
if st.session_state["photo"]=="done" or message:
|
107 |
if st.button("Process_PDF"):
|
108 |
text = read_pdf(uploaded_photo)
|
109 |
#text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
|
|
|
103 |
uploaded_photo = st.file_uploader("Upload Image, Containing English or Bangla texts",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
|
104 |
if "photo" not in st.session_state:
|
105 |
st.session_state["photo"]="not done"
|
106 |
+
if st.session_state["photo"]=="done" or message or uploaded_photo:
|
107 |
if st.button("Process_PDF"):
|
108 |
text = read_pdf(uploaded_photo)
|
109 |
#text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
|