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
a9723c61
Commit
a9723c61
authored
Dec 06, 2024
by
myhloli
Browse files
fix(model): simplify model initialization logic
parent
878f3de0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
magic_pdf/model/sub_modules/model_init.py
magic_pdf/model/sub_modules/model_init.py
+1
-2
No files found.
magic_pdf/model/sub_modules/model_init.py
View file @
a9723c61
...
@@ -97,8 +97,7 @@ class AtomModelSingleton:
...
@@ -97,8 +97,7 @@ class AtomModelSingleton:
key
=
(
atom_model_name
,
layout_model_name
,
lang
)
key
=
(
atom_model_name
,
layout_model_name
,
lang
)
if
key
not
in
self
.
_models
:
if
key
not
in
self
.
_models
:
self
.
_models
[
key
]
=
atom_model_init
(
model_name
=
atom_model_name
,
**
kwargs
)
self
.
_models
[
key
]
=
atom_model_init
(
model_name
=
atom_model_name
,
**
kwargs
)
else
:
return
self
.
_models
[
key
]
return
self
.
_models
[
key
]
def
atom_model_init
(
model_name
:
str
,
**
kwargs
):
def
atom_model_init
(
model_name
:
str
,
**
kwargs
):
...
...
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