Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,12 +17,13 @@ def remove_references(text):
|
|
17 |
|
18 |
|
19 |
def extract_text_from_pdf(file_path):
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
26 |
|
27 |
|
28 |
def model(model_name):
|
|
|
17 |
|
18 |
|
19 |
def extract_text_from_pdf(file_path):
|
20 |
+
text = ""
|
21 |
+
with open(file_path, "rb") as pdf_file:
|
22 |
+
pdf_reader = PyPDF2.PdfReader(pdf_file)
|
23 |
+
for page in pdf_reader.pages:
|
24 |
+
text += page.extract_text() + "\n"
|
25 |
+
return text
|
26 |
+
|
27 |
|
28 |
|
29 |
def model(model_name):
|