feat: OCR 新增沙特(SA)支持; 默认加入沙特
This commit is contained in:
+4
-4
@@ -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",
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user