This commit is contained in:
zy123 2024-09-27 15:47:55 +08:00
parent 0f9f489f2f
commit ba06475efd
2 changed files with 8 additions and 6 deletions

View File

@ -77,8 +77,8 @@ def judge_consortium_bidding(baseinfo_list):
def project_basic_info(knowledge_name,truncate0,output_folder,clause_path): #投标人须知前附表
# 调用大模型回答项目基础信息
baseinfo_list = []
# baseinfo_file_path='flask_app/static/提示词/前两章提问总结.txt'
baseinfo_file_path='D:\\flask_project\\flask_app\\static\\提示词\\前两章提问总结.txt'
baseinfo_file_path='flask_app/static/提示词/前两章提问总结.txt'
# baseinfo_file_path='D:\\flask_project\\flask_app\\static\\提示词\\前两章提问总结.txt'
questions = read_questions_from_file(baseinfo_file_path)
res1 = multi_threading(questions, knowledge_name)
@ -93,9 +93,9 @@ def project_basic_info(knowledge_name,truncate0,output_folder,clause_path): #
# 判断是否分包、是否需要递交投标保证金等
chosen_numbers, merged = judge_whether_main(truncate0,output_folder)
baseinfo_list.append(merged)
# judge_file_path ='flask_app/static/提示词/是否相关问题.txt'
judge_file_path ='flask_app/static/提示词/是否相关问题.txt'
# judge_file_path='D:\\flask_project\\flask_app\\static\\提示词\\是否相关问题.txt'
judge_file_path='D:\\flask_project\\flask_app\\static\\提示词\\是否相关问题.txt'
judge_questions = read_questions_from_judge(judge_file_path, chosen_numbers)
judge_consortium = judge_consortium_bidding(baseinfo_list) #通过招标公告判断是否接受联合体投标

View File

@ -186,8 +186,8 @@ def extract_pages(pdf_path, output_folder, begin_pattern, begin_page, end_patter
start_page, mid_page, end_page = extract_pages_tobidders_notice(pdf_document, begin_pattern, end_pattern,
begin_page, common_header)
if start_page is None or mid_page is None or end_page is None:
print(f"未找到所需页面在文件 {pdf_path} 中!")
return None
print(f"first: {output_suffix} 未找到起始或结束页在文件 {pdf_path} 中!尝试备用提取策略。")
return extract_pages_twice_tobidders_notice(pdf_path, output_folder, output_suffix, common_header)
path1 = save_extracted_pages(pdf_document, start_page, mid_page - 1, pdf_path, output_folder,
"tobidders_notice_part1")
path2 = save_extracted_pages(pdf_document, mid_page, end_page, pdf_path, output_folder,
@ -225,6 +225,8 @@ def extract_pages_tobidders_notice(pdf_document, begin_pattern, end_pattern, beg
break
return start_page, mid_page, end_page
def extract_pages_twice_tobidders_notice():
print("ha")
def get_patterns_for_procurement():
begin_pattern = re.compile(