From 2128f178688055475ae7c8a4204d8f157559206d Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Wed, 5 Aug 2026 07:48:56 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20OCR=20=E6=96=B0=E5=A2=9E=E6=B2=99?= =?UTF-8?q?=E7=89=B9(SA)=E6=94=AF=E6=8C=81;=20=E9=BB=98=E8=AE=A4=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=B2=99=E7=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/ocr/models.py | 8 ++++---- flows/label_ocr.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/ocr/models.py b/api/ocr/models.py index 98543ec..02ae53d 100644 --- a/api/ocr/models.py +++ b/api/ocr/models.py @@ -37,14 +37,14 @@ class OcrResult(BaseModel): # OCR 服务已有分类器模型的国家(版面见 api.md §4) -SUPPORTED_COUNTRIES = {"US", "UK", "DE", "MX"} +SUPPORTED_COUNTRIES = {"US", "UK", "DE", "MX", "SA"} # ISO 国家代码 / 中文国名 → OCR 国家代码 _COUNTRY_MAP: dict[str, str] = { # 代码 - "GB": "UK", "UK": "UK", "US": "US", "DE": "DE", "MX": "MX", - # 中文名(SDS countryName 可能用) - "英国": "UK", "美国": "US", "德国": "DE", "墨西哥": "MX", + "GB": "UK", "UK": "UK", "US": "US", "DE": "DE", "MX": "MX", "SA": "SA", + # 中文名 + "英国": "UK", "美国": "US", "德国": "DE", "墨西哥": "MX", "沙特": "SA", } diff --git a/flows/label_ocr.py b/flows/label_ocr.py index 3bef185..5514006 100644 --- a/flows/label_ocr.py +++ b/flows/label_ocr.py @@ -124,7 +124,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}