From 0bc31889cb9ab0c08a614a4937bdc772e1949825 Mon Sep 17 00:00:00 2001 From: zhanluxianshen Date: Tue, 26 Aug 2025 09:51:56 +0800 Subject: [PATCH] fix typos about parser. Signed-off-by: zhanluxianshen --- dots_ocr/model/inference.py | 5 ----- dots_ocr/parser.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/dots_ocr/model/inference.py b/dots_ocr/model/inference.py index 80f3395..16e4ece 100755 --- a/dots_ocr/model/inference.py +++ b/dots_ocr/model/inference.py @@ -1,8 +1,3 @@ -import json -import io -import base64 -import math -from PIL import Image import requests from dots_ocr.utils.image_utils import PILimage_to_base64 from openai import OpenAI diff --git a/dots_ocr/parser.py b/dots_ocr/parser.py index 54eaf49..8b23ef5 100755 --- a/dots_ocr/parser.py +++ b/dots_ocr/parser.py @@ -153,7 +153,7 @@ class DotsOCRParser: min_pixels = min_pixels or MIN_PIXELS # preprocess image to the final input max_pixels = max_pixels or MAX_PIXELS if min_pixels is not None: assert min_pixels >= MIN_PIXELS, f"min_pixels should >= {MIN_PIXELS}" - if max_pixels is not None: assert max_pixels <= MAX_PIXELS, f"max_pixels should <+ {MAX_PIXELS}" + if max_pixels is not None: assert max_pixels <= MAX_PIXELS, f"max_pixels should <= {MAX_PIXELS}" if source == 'image' and fitz_preprocess: image = get_image_by_fitz_doc(origin_image, target_dpi=self.dpi)