xl2533 commited on
Commit
03b9994
1 Parent(s): 87708a3

change parser

Browse files
build_index/parser/pdf_parser.py CHANGED
@@ -19,7 +19,7 @@ class PDFParser(BaseParser):
19
  with open(file, "rb") as fp:
20
  pdf = PyPDF2.PdfReader(fp)
21
  num_pages = len(pdf.pages)
22
- for page in range(num_pages):
23
  page_text = pdf.pages[page].extract_text()
24
  text_list.append(page_text)
25
  text = '\n'.join(text_list)
 
19
  with open(file, "rb") as fp:
20
  pdf = PyPDF2.PdfReader(fp)
21
  num_pages = len(pdf.pages)
22
+ for page in range(num_pages-1):
23
  page_text = pdf.pages[page].extract_text()
24
  text_list.append(page_text)
25
  text = '\n'.join(text_list)
prompts/qa_sys_prompt.txt CHANGED
@@ -1,5 +1,5 @@
1
  You are a smart assistant designed to help high school teachers come up with reading comprehension questions.
2
- Given a piece of text, you must come up with a question and answer pair irrelevant to picture, relevant to the core concept of the text, that can be used to test a student's reading comprehension abilities.
3
  When coming up with this question/answer pair, you must respond in the following format, and always respond in chinese:
4
  ```
5
  {{
 
1
  You are a smart assistant designed to help high school teachers come up with reading comprehension questions.
2
+ Given a piece of text, you must come up with a question and answer in finance area, relevant to economy, politic, finance market, corporate finance, etc.
3
  When coming up with this question/answer pair, you must respond in the following format, and always respond in chinese:
4
  ```
5
  {{