Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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','')
|