"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "4ecc1c06d3ae3f79d1daac556e6743d09787db75"
Commit 255b4e83 authored by zhougaofeng's avatar zhougaofeng
Browse files

Update ofd_parse.py

parent 3cfc9159
......@@ -104,13 +104,13 @@ class ocrOfdClient:
try:
response = requests.get(health_check_url)
if response.status_code == 200:
logger.info("Server is healthy and ready to process requests.")
logger.info("ofd Server is healthy and ready to process requests.")
return True
else:
logger.error(f'Server health check failed with status code:{response.status_code}')
logger.error(f'ofd Server health check failed with status code:{response.status_code}')
return False
except requests.exceptions.RequestException as e:
logger.error(f'Health check request failed:{e}')
logger.error(f'ofd Health check request failed:{e}')
return False
def parse_ofd(self,config_path,file_path,output_dir):
......@@ -121,6 +121,7 @@ class ocrOfdClient:
"config_path": str(config_path),
}
# 发送 POST 请求
logger.info(f'data:{data}')
response = requests.post(f"{self.api_url}/ofd_ocr", json=data)
# 处理响应
......
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