Soumen commited on
Commit
5aeb295
1 Parent(s): d0ba2f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -124,8 +124,8 @@ def main():
124
  if st.session_state["photo"]=="done" or message:
125
  #text=""
126
  if uploaded_photo.type=='application/pdf':
127
- file = uploaded_file.read() # Read the data
128
- image_result = open(uploaded_file.name, 'wb') # creates a writable image and later we can write the decoded result
129
  image_result.write(file)
130
  text = read_pdf(image_result)
131
  #text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
 
124
  if st.session_state["photo"]=="done" or message:
125
  #text=""
126
  if uploaded_photo.type=='application/pdf':
127
+ file = uploaded_photo.read() # Read the data
128
+ image_result = open(uploaded_photo.name, 'wb') # creates a writable image and later we can write the decoded result
129
  image_result.write(file)
130
  text = read_pdf(image_result)
131
  #text = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)