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
zhougaofeng
magic_pdf
Commits
44e0b598
Commit
44e0b598
authored
Dec 31, 2024
by
zhougaofeng
Browse files
Update pdf_parse_union_core_v2.py
parent
07dc697e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
magic_pdf/pdf_parse_union_core_v2.py
magic_pdf/pdf_parse_union_core_v2.py
+5
-0
No files found.
magic_pdf/pdf_parse_union_core_v2.py
View file @
44e0b598
...
@@ -559,6 +559,11 @@ def pdf_parse_union(config_path,local_image_dir,
...
@@ -559,6 +559,11 @@ def pdf_parse_union(config_path,local_image_dir,
config
=
configparser
.
ConfigParser
()
config
=
configparser
.
ConfigParser
()
config
.
read
(
config_path
)
config
.
read
(
config_path
)
url
=
config
.
get
(
'server'
,
'ocr_server'
)
url
=
config
.
get
(
'server'
,
'ocr_server'
)
vllm_able
=
config
.
get
(
'vllm'
,
'vllm_able'
)
if
vllm_able
:
from
magic_pdf.dict2md.ocr_vllm_client
import
PredictClient
,
compress_image
else
:
from
magic_pdf.dict2md.ocr_client
import
PredictClient
,
compress_image
client
=
PredictClient
(
url
)
client
=
PredictClient
(
url
)
ocr_status
=
client
.
check_health
()
ocr_status
=
client
.
check_health
()
if
not
ocr_status
:
if
not
ocr_status
:
...
...
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