Soumen commited on
Commit
9ff5ac6
·
1 Parent(s): b446f5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -167,8 +167,8 @@ def main():
167
  # convert the image to black and white for better OCR
168
  #ret,thresh1 = cv2.threshold(imge,120,255,cv2.THRESH_BINARY)
169
  # pytesseract image to string to get results
170
- #text = str(pytesseract.image_to_string(img, config='--psm 6',lang="ben")) if st.checkbox("Bangla") else str(pytesseract.image_to_string(thresh1, config='--psm 6'))
171
- text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
172
  st.success(text)
173
  elif camera_photo:
174
  img = Image.open(camera_photo)
@@ -199,7 +199,7 @@ def main():
199
  "inputs": text,
200
  })
201
  st.success(output)
202
- if st.checkbox("Mark to Bangla Text Summarization!"):
203
  def query(payload):
204
  response = requests.post(API_URL0, headers=headers0, json=payload)
205
  return response.json()
 
167
  # convert the image to black and white for better OCR
168
  #ret,thresh1 = cv2.threshold(imge,120,255,cv2.THRESH_BINARY)
169
  # pytesseract image to string to get results
170
+ text = str(pytesseract.image_to_string(img, config='--psm 6',lang="ben")) if st.checkbox("Bangla") else str(pytesseract.image_to_string(thresh1, config='--psm 6'))
171
+ #text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
172
  st.success(text)
173
  elif camera_photo:
174
  img = Image.open(camera_photo)
 
199
  "inputs": text,
200
  })
201
  st.success(output)
202
+ if st.checkbox("Mark for Text Summarization!"):
203
  def query(payload):
204
  response = requests.post(API_URL0, headers=headers0, json=payload)
205
  return response.json()