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
d93ea5b9
Unverified
Commit
d93ea5b9
authored
Aug 07, 2024
by
Xiaomeng Zhao
Committed by
GitHub
Aug 07, 2024
Browse files
Merge pull request #354 from papayalove/master
feat: add table recognition success detect
parents
8da5328f
fbf8f89b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
magic_pdf/model/pdf_extract_kit.py
magic_pdf/model/pdf_extract_kit.py
+1
-2
No files found.
magic_pdf/model/pdf_extract_kit.py
View file @
d93ea5b9
...
...
@@ -36,7 +36,7 @@ from magic_pdf.model.pek_sub_modules.self_modify import ModifiedPaddleOCR
from
magic_pdf.model.pek_sub_modules.structeqtable.StructTableModel
import
StructTableModel
def
table_model_init
(
model_path
,
max_time
=
400
,
_device_
=
'cpu'
):
def
table_model_init
(
model_path
,
max_time
,
_device_
=
'cpu'
):
table_model
=
StructTableModel
(
model_path
,
max_time
=
max_time
,
device
=
_device_
)
return
table_model
...
...
@@ -297,6 +297,5 @@ class CustomPEKModel:
if
latex_code
and
latex_code
.
strip
().
endswith
(
'end{tabular}'
):
layout
[
"latex"
]
=
latex_code
else
:
print
(
latex_code
)
logger
.
warning
(
f
"------------table recognition processing fails----------"
)
return
layout_res
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