tony346 commited on
Commit
89dd67f
1 Parent(s): d87d9d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- pdf_reader = PdfReader(pdf_docs)
 
 
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