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
304bd577
Commit
304bd577
authored
Oct 24, 2024
by
zhougaofeng
Browse files
Update pdf_server.py
parent
bf624a38
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
magic_pdf/tools/pdf_server.py
magic_pdf/tools/pdf_server.py
+4
-0
No files found.
magic_pdf/tools/pdf_server.py
View file @
304bd577
...
@@ -71,6 +71,10 @@ def ocr_pdf_serve(args: str):
...
@@ -71,6 +71,10 @@ def ocr_pdf_serve(args: str):
config_path
=
args
.
config_path
config_path
=
args
.
config_path
uvicorn
.
run
(
app
,
host
=
host
,
port
=
port
)
uvicorn
.
run
(
app
,
host
=
host
,
port
=
port
)
@
app
.
get
(
"/health"
)
async
def
health_check
():
return
{
"status"
:
"healthy"
}
@
app
.
post
(
"/pdf_ocr"
)
@
app
.
post
(
"/pdf_ocr"
)
# def cli(path, output_dir, method, debug_able, start_page_id, end_page_id):
# def cli(path, output_dir, method, debug_able, start_page_id, end_page_id):
async
def
pdf_ocr
(
request
:
ocrRequest
):
async
def
pdf_ocr
(
request
:
ocrRequest
):
...
...
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