Commit 13af2481 authored by zhougaofeng's avatar zhougaofeng
Browse files

Update magic_pdf/parse/pdf_client.py

parent 5cbc9d75
......@@ -27,12 +27,13 @@ class ocrPdfClient:
logger.error(f'Health check request failed:{e}')
return False
def ocr_pdf_client(self, path, output_dir):
def ocr_pdf_client(self, config_path,path, output_dir):
payload = {
"path": str(path),
"output_dir": str(output_dir),
"config_path": str(config_path),
}
# logger.info(f'reading: {path}')
logger.info(f'reading: {payload}')
try:
response = requests.post(f"{self.api_url}/pdf_ocr", json=payload)
output_dir = response.json()['output_path']
......
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