Update app.py
Browse files
app.py
CHANGED
@@ -106,12 +106,12 @@ def main():
|
|
106 |
|
107 |
if st.session_state["photo"]=="done" or message:
|
108 |
file_details = {"Filename":uploaded_photo_photo.name,"FileType":uploaded_photo_photo.type,"FileSize":uploaded_photo_photo.size}
|
109 |
-
|
110 |
if uploaded_photo and uploaded_photo.type == "application/pdf":
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
img = Image.open(uploaded_photo)
|
116 |
img = img.save("img.png")
|
117 |
img = cv2.imread("img.png")
|
|
|
106 |
|
107 |
if st.session_state["photo"]=="done" or message:
|
108 |
file_details = {"Filename":uploaded_photo_photo.name,"FileType":uploaded_photo_photo.type,"FileSize":uploaded_photo_photo.size}
|
109 |
+
st.write(file_details)
|
110 |
if uploaded_photo and uploaded_photo.type == "application/pdf":
|
111 |
+
text = read_pdf(docx_file)
|
112 |
+
text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
|
113 |
+
st.success(text)
|
114 |
+
if uploaded_photo and uploaded_photo.type=="application/image":
|
115 |
img = Image.open(uploaded_photo)
|
116 |
img = img.save("img.png")
|
117 |
img = cv2.imread("img.png")
|