Skip to content

Commit 66fd2e0

Browse files
committed
refactor: 重构output_normalizer功能
> 1. 构建output_normalizer/base_output_normalizer 基类, 抽离功能处理(e.g. 文件上传rustfs.) > 2. 基于base_output_normalizer基类: 1. 构建standard_output_normalizer 支撑mineru输出格式化+文件上传 2. 构建paddleocr_ouput_normalizer 支撑paddleocr-vl-(vllm) 输出格式化+文件上传 feat支持: > 1. 支持paddleocr 文件上传功能 > 2. normalize_output新增handle_method参数支持指定格式化方式(仍然*暂时*兼容 "基于output_dir 是否包含page_* 目录判断是否为PaddleOCR-VL输出") aims: 统一格式化引擎的设计方式--全部基于类来实现 > 1. 更加统一的实现方法 > 2. 方便复用功能函数(上传功能等).
1 parent 627cbe9 commit 66fd2e0

6 files changed

Lines changed: 795 additions & 719 deletions

File tree

backend/litserve_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ def _process_with_paddleocr_vl_vllm(self, file_path: str, options: dict) -> dict
776776
result = self.paddleocr_vl_vllm_engine.parse(file_path, output_path=str(output_dir))
777777

778778
# 规范化输出(统一文件名和目录结构)
779-
normalize_output(output_dir)
779+
normalize_output(output_dir, handle_method="paddleocr-vl")
780780

781781
# 返回结果
782782
return {"result_path": str(output_dir), "content": result.get("markdown", "")}

0 commit comments

Comments
 (0)