"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "41663f682cb7a6508d210d13b8f97b1d14f830dc"
Commit 24763973 authored by zhougaofeng's avatar zhougaofeng
Browse files

Update ocr_server.py

parent 9ab44892
...@@ -26,7 +26,7 @@ REVISION = 'v1.0.4' ...@@ -26,7 +26,7 @@ REVISION = 'v1.0.4'
BOX_TAG_PATTERN = r"<box>([\s\S]*?)</box>" BOX_TAG_PATTERN = r"<box>([\s\S]*?)</box>"
PUNCTUATION = "!?。"#$%&'()*+,-/:;<=>@[\]^_`{|}~⦅⦆「」、、〃》「」『』【】〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏." 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) format="{time} {level} {message}", encoding='utf-8', enqueue=True)
def _get_args(): def _get_args():
...@@ -226,6 +226,10 @@ class Item(BaseModel): ...@@ -226,6 +226,10 @@ class Item(BaseModel):
image_path: str image_path: str
text: str text: str
@app.get("/health")
async def health_check():
return {"status": "healthy"}
@app.post("/predict") @app.post("/predict")
async def predict(item: Item): async def predict(item: Item):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment