"src/lib/components/admin/Settings/Connections.svelte" did not exist on "e8d4e03c0d3001783b12b5e2ec8e728490d23729"
Commit 1e548892 authored by zhougaofeng's avatar zhougaofeng
Browse files

Update pdf_parse_union_core_v2.py

parent b9336031
......@@ -6,6 +6,7 @@ from typing import List
import torch
from loguru import logger
import configparser
from magic_pdf.config.enums import SupportedPdfParseMethod
from magic_pdf.data.dataset import Dataset, PageableData
......@@ -555,6 +556,14 @@ def pdf_parse_union(config_path,local_image_dir,
"""初始化启动时间"""
start_time = time.time()
config = configparser.ConfigParser()
config.read(config_path)
url = config.get('server', 'ocr_server')
client = PredictClient(url)
ocr_status = client.check_health()
if not ocr_status:
logger.warning(f'Health check failed. The server at "{url}" is not responding as expected.')
logger.info(f'Qwen ocr解析服务无法正常运行,暂不使用qwen解析表格服务')
for page_id, page in enumerate(dataset):
"""debug时输出每页解析的耗时."""
......
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