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
316c59be
Commit
316c59be
authored
Oct 25, 2024
by
zhougaofeng
Browse files
Update ocr_server.py
parent
8a1b6709
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
magic_pdf/dict2md/ocr_server.py
magic_pdf/dict2md/ocr_server.py
+4
-2
No files found.
magic_pdf/dict2md/ocr_server.py
View file @
316c59be
...
...
@@ -259,8 +259,10 @@ if __name__ == "__main__":
args
=
_get_args
()
config
=
configparser
.
ConfigParser
()
config
.
read
(
args
.
config_path
)
host
=
config
.
get
(
'server'
,
'ocr_host'
)
port
=
int
(
config
.
get
(
'server'
,
'ocr_port'
))
# host = config.get('server', 'ocr_host')
host
,
port
=
config
.
get
(
'server'
,
'ocr_server'
).
split
(
'://'
)[
1
].
split
(
':'
)[
0
],
int
(
config
.
get
(
'server'
,
'ocr_server'
).
split
(
'://'
)[
1
].
split
(
':'
)[
1
])
# port = int(config.get('server', 'ocr_port'))
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