Update app.py
Browse files
app.py
CHANGED
|
@@ -86,13 +86,13 @@ def main():
|
|
| 86 |
img = cv2.imread("img.png")
|
| 87 |
text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
|
| 88 |
st.success(text)
|
| 89 |
-
|
| 90 |
img = Image.open(camera_photo)
|
| 91 |
img = img.save("img.png")
|
| 92 |
img = cv2.imread("img.png")
|
| 93 |
text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
|
| 94 |
st.success(text)
|
| 95 |
-
|
| 96 |
#our_image=load_image("image.jpg")
|
| 97 |
#img = cv2.imread("scholarly_text.jpg")
|
| 98 |
text = message
|
|
|
|
| 86 |
img = cv2.imread("img.png")
|
| 87 |
text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
|
| 88 |
st.success(text)
|
| 89 |
+
elif camera_photo:
|
| 90 |
img = Image.open(camera_photo)
|
| 91 |
img = img.save("img.png")
|
| 92 |
img = cv2.imread("img.png")
|
| 93 |
text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
|
| 94 |
st.success(text)
|
| 95 |
+
elif uploaded_photo==None and camera_photo==None:
|
| 96 |
#our_image=load_image("image.jpg")
|
| 97 |
#img = cv2.imread("scholarly_text.jpg")
|
| 98 |
text = message
|