awacke1 commited on
Commit
71c5cc2
1 Parent(s): c6647d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -231,7 +231,7 @@ def pdf2txt(docs):
231
  elif file_extension.lower() == 'pdf':
232
  from PyPDF2 import PdfReader
233
  pdf = PdfReader(BytesIO(file.getvalue()))
234
- for page in range(len(reader.pages)):
235
  text += pdf.getPage(page).extractText()
236
  except Exception as e:
237
  st.write(f"Error processing file {file.name}: {e}")
 
231
  elif file_extension.lower() == 'pdf':
232
  from PyPDF2 import PdfReader
233
  pdf = PdfReader(BytesIO(file.getvalue()))
234
+ for page in range(len(pdf.pages)):
235
  text += pdf.getPage(page).extractText()
236
  except Exception as e:
237
  st.write(f"Error processing file {file.name}: {e}")