ZELEFACK commited on
Commit
78f64bc
1 Parent(s): 4a0da27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -39,7 +39,7 @@ def read_article(file_name):
39
  article = article + e
40
  if name.endswith(".pdf"):
41
  # article = textract.process('document_path.PDF', method='PDFminer')
42
- document = PdfFileReader(open(name, 'rb'))
43
  for page in range(document.numPages):
44
  pageObj = document.getPage(page)
45
  article += pageObj.extractText().replace('\n','')
 
39
  article = article + e
40
  if name.endswith(".pdf"):
41
  # article = textract.process('document_path.PDF', method='PDFminer')
42
+ document = PdfFileReader(name)#open(name, 'rb'))
43
  for page in range(document.numPages):
44
  pageObj = document.getPage(page)
45
  article += pageObj.extractText().replace('\n','')