Commit c9d53e7a authored by zhougaofeng's avatar zhougaofeng
Browse files

Update ofd_parse.py

parent 4f28604a
...@@ -121,12 +121,13 @@ class ocrOfdClient: ...@@ -121,12 +121,13 @@ class ocrOfdClient:
"config_path": str(config_path), "config_path": str(config_path),
} }
# 发送 POST 请求 # 发送 POST 请求
#logger.info(f'data:{data}')
response = requests.post(f"{self.api_url}/ofd_ocr", json=data) response = requests.post(f"{self.api_url}/ofd_ocr", json=data)
# 处理响应 # 处理响应
if response.status_code == 200: if response.status_code == 200:
result = response.json() result = response.json()
logger.info(f"文件解析成功,输出路径:{result['output_path']}") #logger.info(f"文件解析成功,输出路径:{result['output_path']}")
return result['output_path'] return result['output_path']
else: else:
logger.error(f"文件解析失败,错误信息:{response.json()}") logger.error(f"文件解析失败,错误信息:{response.json()}")
......
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