mirror of
https://github.com/opendatalab/MinerU.git
synced 2026-03-27 11:08:32 +07:00
Merge pull request #1496 from opendatalab/dev
fix(llm_aided): add enable flag check for LLM aided optimizations
This commit is contained in:
@@ -860,15 +860,18 @@ def pdf_parse_union(
|
||||
"""公式优化"""
|
||||
formula_aided_config = llm_aided_config.get('formula_aided', None)
|
||||
if formula_aided_config is not None:
|
||||
llm_aided_formula(pdf_info_dict, formula_aided_config)
|
||||
if formula_aided_config.get('enable', False):
|
||||
llm_aided_formula(pdf_info_dict, formula_aided_config)
|
||||
"""文本优化"""
|
||||
text_aided_config = llm_aided_config.get('text_aided', None)
|
||||
if text_aided_config is not None:
|
||||
llm_aided_text(pdf_info_dict, text_aided_config)
|
||||
if text_aided_config.get('enable', False):
|
||||
llm_aided_text(pdf_info_dict, text_aided_config)
|
||||
"""标题优化"""
|
||||
title_aided_config = llm_aided_config.get('title_aided', None)
|
||||
if title_aided_config is not None:
|
||||
llm_aided_title(pdf_info_dict, title_aided_config)
|
||||
if title_aided_config.get('enable', False):
|
||||
llm_aided_title(pdf_info_dict, title_aided_config)
|
||||
|
||||
"""dict转list"""
|
||||
pdf_info_list = dict_to_list(pdf_info_dict)
|
||||
|
||||
Reference in New Issue
Block a user