Commit 56f741c2 authored by zhougaofeng's avatar zhougaofeng
Browse files

Update pdf_client.py

parent dcbab82f
......@@ -13,15 +13,14 @@ class ocrPdfClient:
def __init__(self, api_url):
self.api_url = api_url
def ocr_pdf_client(self, path, output_dir, config_path):
def ocr_pdf_client(self, path, output_dir):
payload = {
"path": str(path),
"output_dir": str(output_dir),
"config_path": str(config_path)
}
file_name_without_extension, _ = os.path.splitext(os.path.basename(path))
logger.info(
f'pdf_server: {self.api_url}, pdf path: {path}, config path: {config_path}'
f'pdf_server: {self.api_url}, pdf path: {path}'
)
try:
response = requests.post(f"{self.api_url}/pdf_ocr", json=payload)
......
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