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
8196f3c7
Commit
8196f3c7
authored
Oct 25, 2024
by
zhougaofeng
Browse files
Update pdf_server.py
parent
fe5d6a3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
magic_pdf/tools/pdf_server.py
magic_pdf/tools/pdf_server.py
+4
-2
No files found.
magic_pdf/tools/pdf_server.py
View file @
8196f3c7
...
...
@@ -65,8 +65,10 @@ def ocr_pdf_serve(args: str):
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
]
=
args
.
dcu_id
config
=
configparser
.
ConfigParser
()
config
.
read
(
args
.
config_path
)
host
=
config
.
get
(
'server'
,
'pdf_host'
)
port
=
int
(
config
.
get
(
'server'
,
'pdf_port'
))
# host = config.get('server', 'pdf_host')
# port = int(config.get('server', 'pdf_port'))
pdf_server
=
config
.
get
(
'server'
,
'pdf_server'
).
split
(
'://'
)[
1
]
host
,
port
=
pdf_server
.
split
(
':'
)[
0
],
int
(
pdf_server
.
split
(
':'
)[
1
])
global
config_path
config_path
=
args
.
config_path
uvicorn
.
run
(
app
,
host
=
host
,
port
=
port
)
...
...
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