Commit 44e0b598 authored by zhougaofeng's avatar zhougaofeng
Browse files

Update pdf_parse_union_core_v2.py

parent 07dc697e
......@@ -559,6 +559,11 @@ def pdf_parse_union(config_path,local_image_dir,
config = configparser.ConfigParser()
config.read(config_path)
url = config.get('server', 'ocr_server')
vllm_able = config.get('vllm', 'vllm_able')
if vllm_able:
from magic_pdf.dict2md.ocr_vllm_client import PredictClient, compress_image
else:
from magic_pdf.dict2md.ocr_client import PredictClient,compress_image
client = PredictClient(url)
ocr_status = client.check_health()
if not ocr_status:
......
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