feat(ml): multilingual ocr (#23527)

* handle other languages in ml server

* add variants to model selector

* no need to override path

* unused import
This commit is contained in:
Mert
2025-11-06 12:58:41 -05:00
committed by GitHub
parent a4ae86ce29
commit 6913697ad1
5 changed files with 22 additions and 6 deletions

View File

@@ -275,8 +275,14 @@
name="ocr-model"
bind:value={config.machineLearning.ocr.modelName}
options={[
{ value: 'PP-OCRv5_server', text: 'PP-OCRv5_server' },
{ value: 'PP-OCRv5_mobile', text: 'PP-OCRv5_mobile' },
{ text: 'PP-OCRv5_server (Chinese, Japanese and English)', value: 'PP-OCRv5_server' },
{ text: 'PP-OCRv5_mobile (Chinese, Japanese and English)', value: 'PP-OCRv5_mobile' },
{ text: 'PP-OCRv5_mobile (English-only)', value: 'EN__PP-OCRv5_mobile' },
{ text: 'PP-OCRv5_mobile (Greek and English)', value: 'EL__PP-OCRv5_mobile' },
{ text: 'PP-OCRv5_mobile (Korean and English)', value: 'KOREAN__PP-OCRv5_mobile' },
{ text: 'PP-OCRv5_mobile (Latin script languages)', value: 'LATIN__PP-OCRv5_mobile' },
{ text: 'PP-OCRv5_mobile (Russian, Belarusian, Ukrainian and English)', value: 'ESLAV__PP-OCRv5_mobile' },
{ text: 'PP-OCRv5_mobile (Thai and English)', value: 'TH__PP-OCRv5_mobile' },
]}
disabled={disabled || !config.machineLearning.enabled || !config.machineLearning.ocr.enabled}
isEdited={config.machineLearning.ocr.modelName !== savedConfig.machineLearning.ocr.modelName}