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
23eff75f
Commit
23eff75f
authored
Dec 31, 2024
by
zhougaofeng
Browse files
Update pdf_server.py
parent
b47fb4cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
magic_pdf/tools/pdf_server.py
magic_pdf/tools/pdf_server.py
+0
-2
No files found.
magic_pdf/tools/pdf_server.py
View file @
23eff75f
...
@@ -84,7 +84,6 @@ def setup_environment(args):
...
@@ -84,7 +84,6 @@ def setup_environment(args):
PredictClient
,
compress_image
=
import_ocr_client
(
vllm_able
)
PredictClient
,
compress_image
=
import_ocr_client
(
vllm_able
)
host
,
port
=
pdf_server
.
split
(
':'
)[
0
],
int
(
pdf_server
.
split
(
':'
)[
1
])
host
,
port
=
pdf_server
.
split
(
':'
)[
0
],
int
(
pdf_server
.
split
(
':'
)[
1
])
ocr_client
=
PredictClient
(
ocr_server
)
ocr_client
=
PredictClient
(
ocr_server
)
ocr_status
=
ocr_client
.
check_health
()
return
host
,
port
return
host
,
port
def
import_ocr_client
(
vllm_able
:
bool
):
def
import_ocr_client
(
vllm_able
:
bool
):
...
@@ -131,7 +130,6 @@ async def pdf_ocr(request: ocrRequest):
...
@@ -131,7 +130,6 @@ async def pdf_ocr(request: ocrRequest):
file_name
=
str
(
Path
(
doc_path
).
stem
)
file_name
=
str
(
Path
(
doc_path
).
stem
)
pdf_data
=
read_fn
(
doc_path
)
pdf_data
=
read_fn
(
doc_path
)
output_path
=
do_parse
(
output_path
=
do_parse
(
ocr_status
,
config_path
,
config_path
,
output_dir
,
output_dir
,
file_name
,
file_name
,
...
...
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