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
9fd10b66
Unverified
Commit
9fd10b66
authored
Feb 24, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Feb 24, 2025
Browse files
Merge pull request #1753 from myhloli/dev
fix(llm_aided): update prompt
parents
886d253c
9e332f06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
magic_pdf/model/doc_analyze_by_custom_model.py
magic_pdf/model/doc_analyze_by_custom_model.py
+5
-1
magic_pdf/post_proc/llm_aided.py
magic_pdf/post_proc/llm_aided.py
+1
-1
No files found.
magic_pdf/model/doc_analyze_by_custom_model.py
View file @
9fd10b66
...
...
@@ -145,7 +145,11 @@ def doc_analyze(
table_enable
=
None
,
)
->
InferenceResult
:
end_page_id
=
end_page_id
if
end_page_id
is
not
None
else
len
(
dataset
)
-
1
end_page_id
=
(
end_page_id
if
end_page_id
is
not
None
and
end_page_id
>=
0
else
len
(
dataset
)
-
1
)
model_manager
=
ModelSingleton
()
custom_model
=
model_manager
.
get_model
(
...
...
magic_pdf/post_proc/llm_aided.py
View file @
9fd10b66
...
...
@@ -120,7 +120,7 @@ def llm_aided_title(pdf_info_dict, title_aided_config):
- 在完成初步分级后,仔细检查分级结果的合理性
- 根据上下文关系和逻辑顺序,对不合理的分级进行微调
- 确保最终的分级结果符合文档的实际结构和逻辑
- 字典中
包含OCR错误识别的标题
,你可以通过将其层级标记为 0 来排除它们
- 字典中
可能包含被误当成标题的正文
,你可以通过将其层级标记为 0 来排除它们
IMPORTANT:
请直接返回优化过的由标题层级组成的字典,格式为{{标题id:标题层级}},如下:
...
...
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