From fdcf1079932b13c5c10a38831bf2d58b22afa6d5 Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Thu, 15 Oct 2026 03:12:21 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20OCR=20=E6=96=B0=E5=A2=9E=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=B3=A2=E5=85=B0(PL,=E7=89=88=E5=BC=8F=20pables=5Fdp?= =?UTF-8?q?d/pables=5Finpost)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/ocr/models.py | 6 +++--- flows/label_ocr.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/ocr/models.py b/api/ocr/models.py index 0d287be..d346a11 100644 --- a/api/ocr/models.py +++ b/api/ocr/models.py @@ -37,16 +37,16 @@ class OcrResult(BaseModel): # OCR 服务已有分类器模型的国家(版面见 api.md §4) -SUPPORTED_COUNTRIES = {"US", "UK", "DE", "MX", "SA", "CA", "ES", "IT"} +SUPPORTED_COUNTRIES = {"US", "UK", "DE", "MX", "SA", "CA", "ES", "IT", "PL"} # ISO 国家代码 / 中文国名 → OCR 国家代码 _COUNTRY_MAP: dict[str, str] = { # 代码 "GB": "UK", "UK": "UK", "US": "US", "DE": "DE", "MX": "MX", "SA": "SA", - "CA": "CA", "ES": "ES", "IT": "IT", + "CA": "CA", "ES": "ES", "IT": "IT", "PL": "PL", # 中文名 "英国": "UK", "美国": "US", "德国": "DE", "墨西哥": "MX", "沙特": "SA", - "加拿大": "CA", "西班牙": "ES", "意大利": "IT", + "加拿大": "CA", "西班牙": "ES", "意大利": "IT", "波兰": "PL", } diff --git a/flows/label_ocr.py b/flows/label_ocr.py index dc05a98..fa79125 100644 --- a/flows/label_ocr.py +++ b/flows/label_ocr.py @@ -142,7 +142,7 @@ def label_ocr( 手动跑指定国家: label_ocr(country_regions=['德国']) """ if country_regions is None: - country_regions = ['英国', '美国', '墨西哥', '德国', '沙特', '加拿大', '西班牙', '意大利'] + country_regions = ['英国', '美国', '墨西哥', '德国', '沙特', '加拿大', '西班牙', '意大利', '波兰'] if _has_running_peer(): print("已有 label-ocr 在运行,跳过本次") return {"skipped": True}