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
24763973
Commit
24763973
authored
Oct 24, 2024
by
zhougaofeng
Browse files
Update ocr_server.py
parent
9ab44892
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
magic_pdf/dict2md/ocr_server.py
magic_pdf/dict2md/ocr_server.py
+5
-1
No files found.
magic_pdf/dict2md/ocr_server.py
View file @
24763973
...
...
@@ -26,7 +26,7 @@ REVISION = 'v1.0.4'
BOX_TAG_PATTERN
=
r
"<box>([\s\S]*?)</box>"
PUNCTUATION
=
"!?。"#$%&'()*+,-/:;<=>@[\]^_`{|}~⦅⦆「」、、〃》「」『』【】〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏."
logger
.
add
(
"
../../
parse.log"
,
rotation
=
"10 MB"
,
level
=
"INFO"
,
logger
.
add
(
"parse.log"
,
rotation
=
"10 MB"
,
level
=
"INFO"
,
format
=
"{time} {level} {message}"
,
encoding
=
'utf-8'
,
enqueue
=
True
)
def
_get_args
():
...
...
@@ -226,6 +226,10 @@ class Item(BaseModel):
image_path
:
str
text
:
str
@
app
.
get
(
"/health"
)
async
def
health_check
():
return
{
"status"
:
"healthy"
}
@
app
.
post
(
"/predict"
)
async
def
predict
(
item
:
Item
):
...
...
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