Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
d93ea5b9
Unverified
Commit
d93ea5b9
authored
Aug 07, 2024
by
Xiaomeng Zhao
Committed by
GitHub
Aug 07, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #354 from papayalove/master
feat: add table recognition success detect
parents
8da5328f
fbf8f89b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
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
...
@@ -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