Soumen commited on
Commit
d048358
1 Parent(s): cd4b5cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -116,15 +116,15 @@ def main():
116
  text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
117
  st.success(text)
118
  elif camera_photo:
119
- img = Image.open(camera_photo)
120
- img = img.save("img.png")
121
- img = cv2.imread("img.png")
122
- text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
123
- st.success(text)
124
  elif uploaded_photo==None and camera_photo==None:
125
  #our_image=load_image("image.jpg")
126
  #img = cv2.imread("scholarly_text.jpg")
127
- text = message
128
  if st.checkbox("Show Named Entities English/Bangla"):
129
  entity_result = entity_analyzer(text)
130
  st.json(entity_result)
 
116
  text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
117
  st.success(text)
118
  elif camera_photo:
119
+ img = Image.open(camera_photo)
120
+ img = img.save("img.png")
121
+ img = cv2.imread("img.png")
122
+ text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
123
+ st.success(text)
124
  elif uploaded_photo==None and camera_photo==None:
125
  #our_image=load_image("image.jpg")
126
  #img = cv2.imread("scholarly_text.jpg")
127
+ text = message
128
  if st.checkbox("Show Named Entities English/Bangla"):
129
  entity_result = entity_analyzer(text)
130
  st.json(entity_result)