Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
705720c9
Unverified
Commit
705720c9
authored
Jan 10, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Jan 10, 2025
Browse files
Merge pull request #1496 from opendatalab/dev
fix(llm_aided): add enable flag check for LLM aided optimizations
parents
315ddbd3
dbc52530
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
magic_pdf/pdf_parse_union_core_v2.py
magic_pdf/pdf_parse_union_core_v2.py
+6
-3
No files found.
magic_pdf/pdf_parse_union_core_v2.py
View file @
705720c9
...
@@ -860,15 +860,18 @@ def pdf_parse_union(
...
@@ -860,15 +860,18 @@ def pdf_parse_union(
"""公式优化"""
"""公式优化"""
formula_aided_config
=
llm_aided_config
.
get
(
'formula_aided'
,
None
)
formula_aided_config
=
llm_aided_config
.
get
(
'formula_aided'
,
None
)
if
formula_aided_config
is
not
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
)
text_aided_config
=
llm_aided_config
.
get
(
'text_aided'
,
None
)
if
text_aided_config
is
not
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
)
title_aided_config
=
llm_aided_config
.
get
(
'title_aided'
,
None
)
if
title_aided_config
is
not
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"""
"""dict转list"""
pdf_info_list
=
dict_to_list
(
pdf_info_dict
)
pdf_info_list
=
dict_to_list
(
pdf_info_dict
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment