Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def extract_text_from_pdf(uploaded_file):
|
|
10 |
tmp_file.seek(0)
|
11 |
with open(tmp_file.name, "rb") as f:
|
12 |
reader = PyPDF2.PdfReader(f)
|
13 |
-
num_pages = reader.
|
14 |
for page_num in range(num_pages):
|
15 |
page = reader.getPage(page_num)
|
16 |
text += page.extractText()
|
|
|
10 |
tmp_file.seek(0)
|
11 |
with open(tmp_file.name, "rb") as f:
|
12 |
reader = PyPDF2.PdfReader(f)
|
13 |
+
num_pages = len(reader.pages)
|
14 |
for page_num in range(num_pages):
|
15 |
page = reader.getPage(page_num)
|
16 |
text += page.extractText()
|