Soumen commited on
Commit
1babbd0
1 Parent(s): 7008c69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- if 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
- if uploaded_photo==None and camera_photo==None:
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