Update app.py
Browse files
app.py
CHANGED
@@ -13,10 +13,13 @@ from htmlTemplates import css, bot_template, user_template
|
|
13 |
from langchain.llms import HuggingFaceHub
|
14 |
|
15 |
def get_pdf_text(pdf_docs):
|
16 |
-
text =
|
17 |
-
|
|
|
|
|
18 |
for page in pdf_reader.pages:
|
19 |
text += page.extract_text()
|
|
|
20 |
return text
|
21 |
|
22 |
|
|
|
13 |
from langchain.llms import HuggingFaceHub
|
14 |
|
15 |
def get_pdf_text(pdf_docs):
|
16 |
+
text = ''
|
17 |
+
pdf_file_ = open(pdf_docs,'rb')
|
18 |
+
# text = "example hojin"
|
19 |
+
pdf_reader = PdfReader(pdf_file_)
|
20 |
for page in pdf_reader.pages:
|
21 |
text += page.extract_text()
|
22 |
+
|
23 |
return text
|
24 |
|
25 |
|