Spaces:
Runtime error
Runtime error
Update app.py
Browse filesdeprecated method
app.py
CHANGED
@@ -11,7 +11,7 @@ from newspaper import Article
|
|
11 |
import base64
|
12 |
import docx2txt
|
13 |
from io import StringIO
|
14 |
-
from PyPDF2 import
|
15 |
import validators
|
16 |
import nltk
|
17 |
import warnings
|
@@ -59,7 +59,7 @@ def extract_text_from_file(file):
|
|
59 |
|
60 |
# read pdf file
|
61 |
elif file.type == "application/pdf":
|
62 |
-
pdfReader =
|
63 |
count = pdfReader.numPages
|
64 |
all_text = ""
|
65 |
pdf_title = pdfReader.getDocumentInfo().title
|
|
|
11 |
import base64
|
12 |
import docx2txt
|
13 |
from io import StringIO
|
14 |
+
from PyPDF2 import PdfReader
|
15 |
import validators
|
16 |
import nltk
|
17 |
import warnings
|
|
|
59 |
|
60 |
# read pdf file
|
61 |
elif file.type == "application/pdf":
|
62 |
+
pdfReader = PdfReader(file)
|
63 |
count = pdfReader.numPages
|
64 |
all_text = ""
|
65 |
pdf_title = pdfReader.getDocumentInfo().title
|