Commit 23eff75f authored by zhougaofeng's avatar zhougaofeng
Browse files

Update pdf_server.py

parent b47fb4cb
...@@ -84,7 +84,6 @@ def setup_environment(args): ...@@ -84,7 +84,6 @@ def setup_environment(args):
PredictClient, compress_image = import_ocr_client(vllm_able) PredictClient, compress_image = import_ocr_client(vllm_able)
host, port = pdf_server.split(':')[0], int(pdf_server.split(':')[1]) host, port = pdf_server.split(':')[0], int(pdf_server.split(':')[1])
ocr_client = PredictClient(ocr_server) ocr_client = PredictClient(ocr_server)
ocr_status = ocr_client.check_health()
return host, port return host, port
def import_ocr_client(vllm_able: bool): def import_ocr_client(vllm_able: bool):
...@@ -131,7 +130,6 @@ async def pdf_ocr(request: ocrRequest): ...@@ -131,7 +130,6 @@ async def pdf_ocr(request: ocrRequest):
file_name = str(Path(doc_path).stem) file_name = str(Path(doc_path).stem)
pdf_data = read_fn(doc_path) pdf_data = read_fn(doc_path)
output_path = do_parse( output_path = do_parse(
ocr_status,
config_path, config_path,
output_dir, output_dir,
file_name, file_name,
......
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