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
377b49eb
"...text-generation-inference.git" did not exist on "9af454142a34536ab1f3c149cc8764b7ab460c0d"
Commit
377b49eb
authored
Aug 07, 2024
by
liukaiwen
Browse files
add table recognition success detect
parent
a38c2a88
Changes
1
Hide 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 @
377b49eb
...
@@ -36,7 +36,7 @@ from magic_pdf.model.pek_sub_modules.self_modify import ModifiedPaddleOCR
...
@@ -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
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_
)
table_model
=
StructTableModel
(
model_path
,
max_time
=
max_time
,
device
=
_device_
)
return
table_model
return
table_model
...
@@ -297,6 +297,5 @@ class CustomPEKModel:
...
@@ -297,6 +297,5 @@ class CustomPEKModel:
if
latex_code
and
latex_code
.
strip
().
endswith
(
'end{tabular}'
):
if
latex_code
and
latex_code
.
strip
().
endswith
(
'end{tabular}'
):
layout
[
"latex"
]
=
latex_code
layout
[
"latex"
]
=
latex_code
else
:
else
:
print
(
latex_code
)
logger
.
warning
(
f
"------------table recognition processing fails----------"
)
logger
.
warning
(
f
"------------table recognition processing fails----------"
)
return
layout_res
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