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
|
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 |
{{
|