Update app.py
Browse files
app.py
CHANGED
@@ -6,11 +6,11 @@ import os
|
|
6 |
|
7 |
# Function to process the PDF and categorize text
|
8 |
def process_pdf(file):
|
9 |
-
reader = PyPDF2.
|
10 |
categorized_text = []
|
11 |
|
12 |
-
for page_num in range(reader.
|
13 |
-
page = reader.
|
14 |
text = page.extract_text()
|
15 |
|
16 |
if "Introduction" in text:
|
|
|
6 |
|
7 |
# Function to process the PDF and categorize text
|
8 |
def process_pdf(file):
|
9 |
+
reader = PyPDF2.PdfReader(file)
|
10 |
categorized_text = []
|
11 |
|
12 |
+
for page_num in range(len(reader.pages)):
|
13 |
+
page = reader.pages[page_num]
|
14 |
text = page.extract_text()
|
15 |
|
16 |
if "Introduction" in text:
|