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
78238f39
Commit
78238f39
authored
Aug 01, 2024
by
liukaiwen
Browse files
add table recognition and conversion to LaTeX
parent
3778cbc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
magic_pdf/model/pek_sub_modules/structeqtable/StructTableModel.py
...f/model/pek_sub_modules/structeqtable/StructTableModel.py
+3
-3
No files found.
magic_pdf/model/pek_sub_modules/structeqtable/StructTableModel.py
View file @
78238f39
...
@@ -6,10 +6,10 @@ class StructTableModel:
...
@@ -6,10 +6,10 @@ class StructTableModel:
self
.
model_path
=
model_path
self
.
model_path
=
model_path
self
.
max_new_tokens
=
max_new_tokens
# maximum output tokens length
self
.
max_new_tokens
=
max_new_tokens
# maximum output tokens length
self
.
max_time
=
max_time
# timeout for processing in seconds
self
.
max_time
=
max_time
# timeout for processing in seconds
if
device
==
'cpu'
:
if
device
==
'cuda'
:
self
.
model
=
StructTable
(
self
.
model_path
,
self
.
max_new_tokens
,
self
.
max_time
)
else
:
self
.
model
=
StructTable
(
self
.
model_path
,
self
.
max_new_tokens
,
self
.
max_time
).
cuda
()
self
.
model
=
StructTable
(
self
.
model_path
,
self
.
max_new_tokens
,
self
.
max_time
).
cuda
()
else
:
self
.
model
=
StructTable
(
self
.
model_path
,
self
.
max_new_tokens
,
self
.
max_time
)
def
image2latex
(
self
,
image
)
->
str
:
def
image2latex
(
self
,
image
)
->
str
:
#
#
...
...
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