Added Offline Translation: mbart-large-50-many-to-one-mmt
添加离线翻译:mbart-large-50-many-to-one-mmtpull/174/head
parent
7dad46d692
commit
bbf408ae19
|
|
@ -8,4 +8,5 @@
|
|||
/tags/*
|
||||
/styles/extensions/demo
|
||||
__pycache__
|
||||
/tests/.env
|
||||
/tests/.env
|
||||
/models
|
||||
117
i18n.json
117
i18n.json
|
|
@ -119,7 +119,14 @@
|
|||
"has_new_version": "有新的版本,请及时更新",
|
||||
"wiki_desc": "安装教程、功能详解、使用方法、常见问题等等,详见:",
|
||||
"switch_to_light_theme": "切换到浅色主题",
|
||||
"switch_to_dark_theme": "切换到深色主题"
|
||||
"switch_to_dark_theme": "切换到深色主题",
|
||||
"offline_api": "离线翻译",
|
||||
"initialize": "初始化",
|
||||
"initialize_finished": "初始化完成",
|
||||
"initialize_failed": "初始化失败",
|
||||
"model_not_initialized": "模型未初始化",
|
||||
"model_is_loading": "模型正在加载中...",
|
||||
"download_model_desc": "<p>如果以前未下载过模型,程序将从 Hugging Face 自动下载模型。</p><p>模型有几G大小,对网络环境要求较高。</p><p>下载时间较长,请耐心等待,如果下载失败,请重新初始化。</p><p>你可以前往控制台查看详细日志和进度。</p><p>模型文件将下载到目录:extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -240,7 +247,14 @@
|
|||
"has_new_version": "有新的版本,請及時更新",
|
||||
"wiki_desc": "安裝教程、功能詳解、使用方法、常見問題等等,詳見:",
|
||||
"switch_to_light_theme": "切換到淺色主題",
|
||||
"switch_to_dark_theme": "切換到深色主題"
|
||||
"switch_to_dark_theme": "切換到深色主題",
|
||||
"offline_api": "離線翻譯",
|
||||
"initialize": "初始化",
|
||||
"initialize_finished": "初始化完成",
|
||||
"initialize_failed": "初始化失敗",
|
||||
"model_not_initialized": "模型未初始化",
|
||||
"model_is_loading": "模型正在載入中...",
|
||||
"download_model_desc": "<p>如果以前未下載過模型,程式將從 Hugging Face 自動下載模型。</p><p>模型有幾G大小,對網絡環境要求較高。</p><p>下載時間較長,請耐心等待,如果下載失敗,請重新初始化。</p><p>你可以前往控制台查看詳細日誌和進度。</p><p>模型文件將下載到目錄:extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -361,7 +375,14 @@
|
|||
"has_new_version": "有新的版本,請及時更新",
|
||||
"wiki_desc": "安裝教程、功能詳解、使用方法、常見問題等等,詳見:",
|
||||
"switch_to_light_theme": "切換到淺色主題",
|
||||
"switch_to_dark_theme": "切換到深色主題"
|
||||
"switch_to_dark_theme": "切換到深色主題",
|
||||
"offline_api": "離線翻譯",
|
||||
"initialize": "初始化",
|
||||
"initialize_finished": "初始化完成",
|
||||
"initialize_failed": "初始化失敗",
|
||||
"model_not_initialized": "模型未初始化",
|
||||
"model_is_loading": "模型正在載入中...",
|
||||
"download_model_desc": "<p>如果以前未下載過模型,程式將從 Hugging Face 自動下載模型。</p><p>模型有幾G大小,對網絡環境要求較高。</p><p>下載時間較長,請耐心等待,如果下載失敗,請重新初始化。</p><p>你可以前往控制台查看詳細日誌和進度。</p><p>模型檔案將下載到目錄:extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -482,7 +503,14 @@
|
|||
"has_new_version": "There is a new version available, please update",
|
||||
"wiki_desc": "Installation tutorial, detailed features, usage instructions, frequently asked questions, etc. See:",
|
||||
"switch_to_light_theme": "Switch to Light Theme",
|
||||
"switch_to_dark_theme": "Switch to Dark Theme"
|
||||
"switch_to_dark_theme": "Switch to Dark Theme",
|
||||
"offline_api": "Offline Translation",
|
||||
"initialize": "Initialize",
|
||||
"initialize_finished": "Initialization Finished",
|
||||
"initialize_failed": "Initialization Failed",
|
||||
"model_not_initialized": "Model Not Initialized",
|
||||
"model_is_loading": "Model is Loading...",
|
||||
"download_model_desc": "<p>If the model has not been downloaded before, the program will automatically download the model from Hugging Face.</p><p>The model is several gigabytes in size and requires a high-speed internet connection.</p><p>The download may take a while, please be patient. If the download fails, please reinitialize.</p><p>You can check detailed logs and progress in the console.</p><p>The model files will be downloaded to the directory: extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -614,7 +642,14 @@
|
|||
"has_new_version": "هناك إصدار جديد متاح، يرجى التحديث في الوقت المناسب",
|
||||
"wiki_desc": "دليل التثبيت، التفاصيل الكاملة للميزات، تعليمات الاستخدام، الأسئلة الشائعة، وما إلى ذلك. انظر:",
|
||||
"switch_to_light_theme": "التبديل إلى النمط الفاتح",
|
||||
"switch_to_dark_theme": "التبديل إلى النمط الداكن"
|
||||
"switch_to_dark_theme": "التبديل إلى النمط الداكن",
|
||||
"offline_api": "الترجمة بدون اتصال",
|
||||
"initialize": "بدء التشغيل",
|
||||
"initialize_finished": "انتهاء التهيئة",
|
||||
"initialize_failed": "فشل في التهيئة",
|
||||
"model_not_initialized": "النموذج غير مهيأ",
|
||||
"model_is_loading": "جاري تحميل النموذج...",
|
||||
"download_model_desc": "<p>إذا لم يتم تنزيل النموذج من قبل، سيقوم البرنامج بتنزيل النموذج تلقائيًا من Hugging Face.</p><p>النموذج بحجم عدة جيجابايت ويتطلب اتصال إنترنت عالي السرعة.</p><p>قد يستغرق التنزيل وقتًا طويلاً، يرجى الانتظار بصبر. إذا فشل التنزيل، يُرجى إعادة التهيئة.</p><p>يمكنك التحقق من السجلات والتقدم التفصيلي في وحدة التحكم.</p><p>سيتم تنزيل ملفات النموذج إلى الدليل: extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -834,7 +869,14 @@
|
|||
"has_new_version": "Une nouvelle version est disponible, veuillez mettre à jour",
|
||||
"wiki_desc": "Tutoriel d'installation, fonctionnalités détaillées, instructions d'utilisation, questions fréquentes, etc. Voir :",
|
||||
"switch_to_light_theme": "Passer au thème clair",
|
||||
"switch_to_dark_theme": "Passer au thème sombre"
|
||||
"switch_to_dark_theme": "Passer au thème sombre",
|
||||
"offline_api": "Traduction hors ligne",
|
||||
"initialize": "Initialiser",
|
||||
"initialize_finished": "Initialisation terminée",
|
||||
"initialize_failed": "Échec de l'initialisation",
|
||||
"model_not_initialized": "Modèle non initialisé",
|
||||
"model_is_loading": "Chargement du modèle en cours...",
|
||||
"download_model_desc": "<p>Si le modèle n'a pas été téléchargé auparavant, le programme le téléchargera automatiquement depuis Hugging Face.</p><p>Le modèle est de plusieurs gigaoctets et nécessite une connexion Internet haut débit.</p><p>Le téléchargement peut prendre un certain temps, veuillez patienter. Si le téléchargement échoue, veuillez réinitialiser.</p><p>Vous pouvez consulter les journaux détaillés et l'avancement dans la console.</p><p>Les fichiers du modèle seront téléchargés dans le répertoire : extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -969,7 +1011,14 @@
|
|||
"has_new_version": "Es ist eine neue Version verfügbar, bitte aktualisieren",
|
||||
"wiki_desc": "Installationsanleitung, detaillierte Funktionen, Verwendungshinweise, häufig gestellte Fragen usw. Siehe:",
|
||||
"switch_to_light_theme": "Zum hellen Thema wechseln",
|
||||
"switch_to_dark_theme": "Zum dunklen Thema wechseln"
|
||||
"switch_to_dark_theme": "Zum dunklen Thema wechseln",
|
||||
"offline_api": "Offline-Übersetzung",
|
||||
"initialize": "Initialisieren",
|
||||
"initialize_finished": "Initialisierung abgeschlossen",
|
||||
"initialize_failed": "Initialisierung fehlgeschlagen",
|
||||
"model_not_initialized": "Modell nicht initialisiert",
|
||||
"model_is_loading": "Modell wird geladen...",
|
||||
"download_model_desc": "<p>Wenn das Modell zuvor nicht heruntergeladen wurde, lädt das Programm das Modell automatisch von Hugging Face herunter.</p><p>Das Modell ist mehrere Gigabyte groß und erfordert eine schnelle Internetverbindung.</p><p>Der Download kann eine Weile dauern, bitte haben Sie Geduld. Wenn der Download fehlschlägt, initialisieren Sie bitte erneut.</p><p>Sie können detaillierte Protokolle und den Fortschritt in der Konsole überprüfen.</p><p>Die Modelldateien werden in das Verzeichnis heruntergeladen: extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1154,7 +1203,14 @@
|
|||
"has_new_version": "È disponibile una nuova versione, si prega di aggiornare",
|
||||
"wiki_desc": "Tutorial di installazione, funzionalità dettagliate, istruzioni per l'uso, domande frequenti, ecc. Vedi:",
|
||||
"switch_to_light_theme": "Passa al tema chiaro",
|
||||
"switch_to_dark_theme": "Passa al tema scuro"
|
||||
"switch_to_dark_theme": "Passa al tema scuro",
|
||||
"offline_api": "Traduzione offline",
|
||||
"initialize": "Inizializza",
|
||||
"initialize_finished": "Inizializzazione completata",
|
||||
"initialize_failed": "Inizializzazione non riuscita",
|
||||
"model_not_initialized": "Modello non inizializzato",
|
||||
"model_is_loading": "Caricamento del modello in corso...",
|
||||
"download_model_desc": "<p>Se il modello non è stato scaricato in precedenza, il programma lo scaricherà automaticamente da Hugging Face.</p><p>Il modello ha una dimensione di diverse gigabyte e richiede una connessione Internet ad alta velocità.</p><p>Il download potrebbe richiedere del tempo, si prega di attendere. Se il download non riesce, ripetere l'inizializzazione.</p><p>È possibile controllare i log dettagliati e il progresso nella console.</p><p>I file del modello verranno scaricati nella directory: extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1274,7 +1330,14 @@
|
|||
"has_new_version": "新しいバージョンがあります。更新してください",
|
||||
"wiki_desc": "インストールチュートリアル、詳細な機能、使用方法、よくある質問などはこちらを参照してください:",
|
||||
"switch_to_light_theme": "ライトテーマに切り替える",
|
||||
"switch_to_dark_theme": "ダークテーマに切り替える"
|
||||
"switch_to_dark_theme": "ダークテーマに切り替える",
|
||||
"offline_api": "オフライン翻訳",
|
||||
"initialize": "初期化",
|
||||
"initialize_finished": "初期化完了",
|
||||
"initialize_failed": "初期化失敗",
|
||||
"model_not_initialized": "モデルが初期化されていません",
|
||||
"model_is_loading": "モデルを読み込んでいます...",
|
||||
"download_model_desc": "<p>以前にモデルがダウンロードされていない場合、プログラムはHugging Faceからモデルを自動的にダウンロードします。</p><p>モデルのサイズは数ギガバイトあり、高速なインターネット接続が必要です。</p><p>ダウンロードには時間がかかる場合がありますので、お待ちください。ダウンロードに失敗した場合は、再初期化してください。</p><p>詳細なログと進捗状況はコンソールで確認できます。</p><p>モデルファイルは次のディレクトリにダウンロードされます:extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1419,7 +1482,14 @@
|
|||
"has_new_version": "새로운 버전이 있습니다. 업데이트하세요",
|
||||
"wiki_desc": "설치 안내서, 자세한 기능, 사용 방법, 자주 묻는 질문 등은 다음을 참조하세요:",
|
||||
"switch_to_light_theme": "밝은 테마로 전환",
|
||||
"switch_to_dark_theme": "어두운 테마로 전환"
|
||||
"switch_to_dark_theme": "어두운 테마로 전환",
|
||||
"offline_api": "오프라인 번역",
|
||||
"initialize": "초기화",
|
||||
"initialize_finished": "초기화 완료",
|
||||
"initialize_failed": "초기화 실패",
|
||||
"model_not_initialized": "모델이 초기화되지 않음",
|
||||
"model_is_loading": "모델을 불러오는 중...",
|
||||
"download_model_desc": "<p>이전에 모델을 다운로드하지 않은 경우 프로그램이 Hugging Face에서 모델을 자동으로 다운로드합니다.</p><p>모델은 몇 기가바이트 크기이며 고속 인터넷 연결이 필요합니다.</p><p>다운로드에는 시간이 걸릴 수 있으므로 잠시 기다려주십시오. 다운로드에 실패한 경우 초기화를 다시 진행하십시오.</p><p>자세한 로그와 진행 상황은 콘솔에서 확인할 수 있습니다.</p><p>모델 파일은 다음 디렉터리에 다운로드됩니다: extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1654,7 +1724,14 @@
|
|||
"has_new_version": "Há uma nova versão disponível, por favor atualize",
|
||||
"wiki_desc": "Tutorial de instalação, recursos detalhados, instruções de uso, perguntas frequentes, etc. Veja:",
|
||||
"switch_to_light_theme": "Mudar para o tema claro",
|
||||
"switch_to_dark_theme": "Mudar para o tema escuro"
|
||||
"switch_to_dark_theme": "Mudar para o tema escuro",
|
||||
"offline_api": "Tradução Offline",
|
||||
"initialize": "Inicializar",
|
||||
"initialize_finished": "Inicialização Concluída",
|
||||
"initialize_failed": "Inicialização Falhou",
|
||||
"model_not_initialized": "Modelo Não Inicializado",
|
||||
"model_is_loading": "A Carregar o Modelo...",
|
||||
"download_model_desc": "<p>Se o modelo ainda não foi descarregado anteriormente, o programa irá descarregar automaticamente o modelo da Hugging Face.</p><p>O modelo tem vários gigabytes de tamanho e requer uma ligação à Internet de alta velocidade.</p><p>O descarregamento pode demorar algum tempo, por favor tenha paciência. Se o descarregamento falhar, por favor reinicialize.</p><p>Pode verificar os registos detalhados e o progresso na consola.</p><p>Os ficheiros do modelo serão descarregados para o diretório: extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1789,7 +1866,14 @@
|
|||
"has_new_version": "Доступна новая версия, пожалуйста, обновитесь",
|
||||
"wiki_desc": "Инструкция по установке, подробные функции, инструкции по использованию, часто задаваемые вопросы и т. д. Смотрите:",
|
||||
"switch_to_light_theme": "Переключиться на светлую тему",
|
||||
"switch_to_dark_theme": "Переключиться на темную тему"
|
||||
"switch_to_dark_theme": "Переключиться на темную тему",
|
||||
"offline_api": "Офлайн-перевод",
|
||||
"initialize": "Инициализация",
|
||||
"initialize_finished": "Инициализация завершена",
|
||||
"initialize_failed": "Ошибка инициализации",
|
||||
"model_not_initialized": "Модель не инициализирована",
|
||||
"model_is_loading": "Загрузка модели...",
|
||||
"download_model_desc": "<p>Если модель ранее не была загружена, программа автоматически загрузит модель с Hugging Face.</p><p>Модель имеет размер несколько гигабайт и требует высокоскоростного интернет-соединения.</p><p>Загрузка может занять некоторое время, пожалуйста, подождите. Если загрузка не удалась, повторите инициализацию.</p><p>Вы можете проверить подробные журналы и прогресс в консоли.</p><p>Файлы модели будут загружены в каталог: extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1939,7 +2023,14 @@
|
|||
"has_new_version": "Hay una nueva versión disponible, por favor actualiza",
|
||||
"wiki_desc": "Tutorial de instalación, características detalladas, instrucciones de uso, preguntas frecuentes, etc. Ver:",
|
||||
"switch_to_light_theme": "Cambiar a tema claro",
|
||||
"switch_to_dark_theme": "Cambiar a tema oscuro"
|
||||
"switch_to_dark_theme": "Cambiar a tema oscuro",
|
||||
"offline_api": "Traducción sin conexión",
|
||||
"initialize": "Inicializar",
|
||||
"initialize_finished": "Inicialización finalizada",
|
||||
"initialize_failed": "Error de inicialización",
|
||||
"model_not_initialized": "Modelo no inicializado",
|
||||
"model_is_loading": "Cargando modelo...",
|
||||
"download_model_desc": "<p>Si el modelo no se ha descargado anteriormente, el programa lo descargará automáticamente desde Hugging Face.</p><p>El modelo tiene varios gigabytes de tamaño y requiere una conexión a Internet de alta velocidad.</p><p>La descarga puede tardar un tiempo, por favor, ten paciencia. Si la descarga falla, por favor, reinicializa.</p><p>Puedes consultar los registros detallados y el progreso en la consola.</p><p>Los archivos del modelo se descargarán en el directorio: extensions\\sd-webui-prompt-all-in-one\\models</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -19,6 +19,7 @@ from scripts.physton_prompt.packages import get_packages_state, install_package
|
|||
from scripts.physton_prompt.gen_openai import gen_openai
|
||||
from scripts.physton_prompt.get_lang import get_lang
|
||||
from scripts.physton_prompt.get_version import get_git_commit_version, get_git_remote_versions, get_latest_version
|
||||
from scripts.physton_prompt.mbart50 import initialize as mbart50_initialize, translate as mbart50_translate
|
||||
|
||||
try:
|
||||
from modules.shared import cmd_opts
|
||||
|
|
@ -344,6 +345,21 @@ def on_app_started(_: gr.Blocks, app: FastAPI):
|
|||
except Exception as e:
|
||||
return {"success": False, 'message': str(e)}
|
||||
|
||||
@app.post("/physton_prompt/mbart50_initialize")
|
||||
async def _mbart50_initialize(request: Request):
|
||||
try:
|
||||
mbart50_initialize(True)
|
||||
return {"success": True}
|
||||
except Exception as e:
|
||||
return {"success": False, 'message': str(e)}
|
||||
|
||||
try:
|
||||
translate_api = st.get('translateApi')
|
||||
if translate_api == 'mbart50':
|
||||
mbart50_initialize()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
script_callbacks.on_app_started(on_app_started)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
import os
|
||||
from scripts.physton_prompt.get_lang import get_lang
|
||||
|
||||
model = None
|
||||
tokenizer = None
|
||||
model_name = "facebook/mbart-large-50-many-to-many-mmt"
|
||||
cache_dir = os.path.normpath(os.path.dirname(os.path.abspath(__file__)) + '/../../models')
|
||||
loading = False
|
||||
|
||||
def initialize(reload=False):
|
||||
global model, tokenizer, model_name, cache_dir, loading
|
||||
if loading:
|
||||
raise Exception(get_lang('model_is_loading'))
|
||||
return
|
||||
if not reload and model is not None:
|
||||
return
|
||||
loading = True
|
||||
from transformers import MBart50TokenizerFast, MBartForConditionalGeneration
|
||||
print(f'[sd-webui-prompt-all-in-one] Loading model {model_name} from {cache_dir}...')
|
||||
model = MBartForConditionalGeneration.from_pretrained(model_name, cache_dir=cache_dir)
|
||||
tokenizer = MBart50TokenizerFast.from_pretrained(model_name, cache_dir=cache_dir)
|
||||
print(f'[sd-webui-prompt-all-in-one] Model {model_name} loaded.')
|
||||
loading = False
|
||||
|
||||
def translate(text, src_lang, target_lang):
|
||||
global model, tokenizer
|
||||
|
||||
if not text:
|
||||
if isinstance(text, list):
|
||||
return []
|
||||
else:
|
||||
return ''
|
||||
|
||||
if model is None:
|
||||
raise Exception(get_lang('model_not_initialized'))
|
||||
|
||||
if tokenizer is None:
|
||||
raise Exception(get_lang('model_not_initialized'))
|
||||
|
||||
if src_lang == target_lang:
|
||||
return text
|
||||
|
||||
tokenizer.src_lang = src_lang
|
||||
encoded_input = tokenizer(text, return_tensors="pt", padding=True)
|
||||
generated_tokens = model.generate(
|
||||
**encoded_input, forced_bos_token_id=tokenizer.lang_code_to_id[target_lang],
|
||||
max_new_tokens=500
|
||||
)
|
||||
return tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)
|
||||
|
|
@ -17,6 +17,7 @@ from scripts.physton_prompt.translator.mymemory_translator import MyMemoryTransl
|
|||
from scripts.physton_prompt.translator.niutrans_translator import NiutransTranslator
|
||||
from scripts.physton_prompt.translator.caiyun_translator import CaiyunTranslator
|
||||
from scripts.physton_prompt.translator.volcengine_translator import VolcengineTranslator
|
||||
from scripts.physton_prompt.translator.mbart50_translator import MBart50Translator
|
||||
|
||||
caches = {}
|
||||
|
||||
|
|
@ -107,6 +108,8 @@ def translate(text, from_lang, to_lang, api, api_config=None):
|
|||
translator = CaiyunTranslator()
|
||||
elif api == 'volcengine':
|
||||
translator = VolcengineTranslator()
|
||||
elif api == 'mbart50':
|
||||
translator = MBart50Translator()
|
||||
elif 'type' in find and find['type'] == 'translators':
|
||||
translator = TranslatorsTranslator(api)
|
||||
translator.set_translator(find['translator'])
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
from scripts.physton_prompt.translator.base_tanslator import BaseTranslator
|
||||
from scripts.physton_prompt.get_lang import get_lang
|
||||
from scripts.physton_prompt.mbart50 import initialize as mbart50_initialize, translate as mbart50_translate
|
||||
|
||||
|
||||
class MBart50Translator(BaseTranslator):
|
||||
def __init__(self):
|
||||
super().__init__('mbart50')
|
||||
|
||||
def translate(self, text):
|
||||
if not text:
|
||||
if isinstance(text, list):
|
||||
return []
|
||||
else:
|
||||
return ''
|
||||
|
||||
result = mbart50_translate(text=text, src_lang=self.from_lang, target_lang=self.to_lang)
|
||||
if not result:
|
||||
raise Exception(get_lang('response_is_empty', {'0': 'mbart50'}))
|
||||
|
||||
if isinstance(text, list):
|
||||
return result
|
||||
else:
|
||||
return result[0]
|
||||
|
||||
def translate_batch(self, texts):
|
||||
return self.translate(texts)
|
||||
|
|
@ -38,6 +38,22 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting-line" v-if="apiItem.key === 'mbart50'">
|
||||
<div class="line-title">{{ getLang('initialize') }}</div>
|
||||
<div class="line-content">
|
||||
<div class="hover-scale-120 test-btn" @click="onMbart50Initialize">
|
||||
<icon-svg v-if="mbart50Loading" name="loading"/>
|
||||
<template v-else>{{ getLang('initialize') }}</template>
|
||||
</div>
|
||||
<p class="common-red" v-html="getLang('download_model_desc')"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting-line" v-if="apiItem.key === 'mbart50' && mbart50Message">
|
||||
<div class="line-title"></div>
|
||||
<div class="line-content">
|
||||
<div :class="[mbart50Success ? '' : 'common-red']">{{ mbart50Message }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting-line">
|
||||
<div class="line-title">{{ getLang('translate_test') }}</div>
|
||||
<div class="line-content">
|
||||
|
|
@ -63,6 +79,10 @@
|
|||
<div class="setting-line">
|
||||
<div class="line-title">TagComplete</div>
|
||||
<div class="line-content">
|
||||
<div class="help-list">
|
||||
<div class="help-item">[?] <a href="https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#tagcomplete-translation-enhancement" target="_blank">[Wiki] TagComplete Translation enhancement</a>
|
||||
</div>
|
||||
</div>
|
||||
<div v-html="getLang('tagcomplete_translate_desc')"></div>
|
||||
<div class="common-red" v-html="getLang('tagcomplete_translate_desc2')"></div>
|
||||
<div class="line-row">
|
||||
|
|
@ -127,6 +147,10 @@ Github: Physton/sd-webui-prompt-all-in-one`,
|
|||
tagCompleteFileKey: '',
|
||||
tagCompleteResults: [],
|
||||
onlyCsvOnAutoValue: false,
|
||||
|
||||
mbart50Loading: false,
|
||||
mbart50Success: false,
|
||||
mbart50Message: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -197,6 +221,8 @@ Github: Physton/sd-webui-prompt-all-in-one`,
|
|||
this.loading = false
|
||||
this.tagCompleteFileKey = this.tagCompleteFile
|
||||
this.onlyCsvOnAutoValue = this.onlyCsvOnAuto
|
||||
this.mbart50Success = false
|
||||
this.mbart50Message = ''
|
||||
this.refreshCSVs()
|
||||
},
|
||||
getItemName(item) {
|
||||
|
|
@ -307,6 +333,23 @@ Github: Physton/sd-webui-prompt-all-in-one`,
|
|||
})
|
||||
})
|
||||
},
|
||||
onMbart50Initialize() {
|
||||
this.mbart50Loading = true
|
||||
this.mbart50Success = false
|
||||
this.mbart50Message = ''
|
||||
this.gradioAPI.mbart50Initialize().then(res => {
|
||||
this.mbart50Loading = false
|
||||
if (res.success) {
|
||||
this.mbart50Success = true
|
||||
this.mbart50Message = this.getLang('initialize_finished')
|
||||
} else {
|
||||
this.mbart50Message = this.getLang('initialize_failed') + ': ' + res.message
|
||||
}
|
||||
}).catch(err => {
|
||||
this.mbart50Loading = false
|
||||
this.mbart50Message = err.message
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -174,4 +174,9 @@ export default class GradioAPI {
|
|||
async genOpenAI(messages, api_config) {
|
||||
return (await this.api.post("/gen_openai", {messages, api_config})).data
|
||||
}
|
||||
|
||||
async mbart50Initialize() {
|
||||
const config = {timeout: 100000000000}
|
||||
return (await this.api.post("/mbart50_initialize", {}, config)).data
|
||||
}
|
||||
}
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -295,7 +295,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -447,7 +447,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -555,7 +555,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -666,7 +666,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -744,7 +744,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -789,7 +789,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -830,7 +830,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -869,7 +869,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -920,7 +920,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -957,7 +957,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -985,7 +985,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1013,7 +1013,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1130,7 +1130,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1247,7 +1247,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1292,7 +1292,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1335,7 +1335,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1361,7 +1361,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1480,7 +1480,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1525,7 +1525,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1554,7 +1554,7 @@
|
|||
"url": "https://github.com/UlionTse/translators"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1686,7 +1686,7 @@
|
|||
"url": "https://mymemory.translated.net/doc/usagelimits.php"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
|
|
@ -1812,7 +1812,7 @@
|
|||
"url": "https://ttime.timerecord.cn/pages/2448b0/"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -1961,11 +1961,11 @@
|
|||
"url": "https://pot.pylogmon.com/docs/tutorial/api/openai"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Configure ChatGPT / 配置ChatGPT",
|
||||
"title": "[prompt-all-in-one Wiki] Configure ChatGPT / 配置ChatGPT",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/UsingChatgptToGeneratePrompts.html#configure-chatgpt"
|
||||
}
|
||||
],
|
||||
|
|
@ -2134,7 +2134,7 @@
|
|||
"url": "https://bobtranslate.com/service/translate/microsoft.html"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -2244,7 +2244,7 @@
|
|||
"url": "https://bobtranslate.com/service/translate/amazon.html"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -2356,7 +2356,7 @@
|
|||
"url": "https://pot.pylogmon.com/docs/tutorial/api/deepl"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -2460,7 +2460,7 @@
|
|||
"url": "https://cloud.yandex.com/en/docs/iam/operations/api-key/create"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -2591,7 +2591,7 @@
|
|||
"url": "https://mymemory.translated.net/doc/keygen.php"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -2656,7 +2656,7 @@
|
|||
"url": "https://pot.pylogmon.com/docs/tutorial/api/baidu"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -2792,7 +2792,7 @@
|
|||
"url": "https://pot.pylogmon.com/docs/tutorial/api/alibaba/"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -2952,7 +2952,7 @@
|
|||
"url": "https://ttime.timerecord.cn/pages/43750c/"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -3012,7 +3012,7 @@
|
|||
"url": "https://pot.pylogmon.com/docs/tutorial/api/tencent"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -3174,7 +3174,7 @@
|
|||
"url": "https://ttime.timerecord.cn/pages/cc1bc7/"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -3214,7 +3214,7 @@
|
|||
"url": "https://pot.pylogmon.com/docs/tutorial/api/caiyun"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -3331,7 +3331,7 @@
|
|||
"url": "https://pot.pylogmon.com/docs/tutorial/api/volcengine"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one WIKI] Translation API Description / 翻译接口说明",
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
],
|
||||
|
|
@ -3361,6 +3361,85 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "offline_api",
|
||||
"children": [
|
||||
{
|
||||
"key": "mbart50",
|
||||
"name": "facebook / mbart-large-50-many-to-one-mmt",
|
||||
"concurrent": 999,
|
||||
"support": {
|
||||
"ar_SA": "ar_AR",
|
||||
"cs_CZ": "cs_CZ",
|
||||
"de_DE": "de_DE",
|
||||
"en_US": "en_XX",
|
||||
"en_GB": "en_XX",
|
||||
"es_ES": "es_ES",
|
||||
"et_EE": "et_EE",
|
||||
"fi_FI": "fi_FI",
|
||||
"fr_FR": "fr_XX",
|
||||
"fr_CA": "fr_XX",
|
||||
"gu_IN": "gu_IN",
|
||||
"hi_IN": "hi_IN",
|
||||
"it_IT": "it_IT",
|
||||
"ja_JP": "ja_XX",
|
||||
"kk_KZ": "kk_KZ",
|
||||
"ko_KR": "ko_KR",
|
||||
"lt_LT": "lt_LT",
|
||||
"lv_LV": "lv_LV",
|
||||
"my_MM": "my_MM",
|
||||
"ne_NP": "ne_NP",
|
||||
"nl_NL": "nl_XX",
|
||||
"ro_RO": "ro_RO",
|
||||
"ru_RU": "ru_RU",
|
||||
"si_LK": "si_LK",
|
||||
"tr_TR": "tr_TR",
|
||||
"vi_VN": "vi_VN",
|
||||
"zh_CN": "zh_CN",
|
||||
"af_ZA": "af_ZA",
|
||||
"az_Latn_AZ": "az_AZ",
|
||||
"bn_BD": "bn_IN",
|
||||
"fa_IR": "fa_IR",
|
||||
"he_IL": "he_IL",
|
||||
"hr_HR": "hr_HR",
|
||||
"id_ID": "id_ID",
|
||||
"ka_GE": "ka_GE",
|
||||
"km_KH": "km_KH",
|
||||
"mk_MK": "mk_MK",
|
||||
"ml_IN": "ml_IN",
|
||||
"mn_MN": "mn_MN",
|
||||
"mn_Cyrl_MN": "mn_MN",
|
||||
"mn_Mong_CN": "mn_MN",
|
||||
"mr_IN": "mr_IN",
|
||||
"pl_PL": "pl_PL",
|
||||
"ps_AF": "ps_AF",
|
||||
"pt_BR": "pt_XX",
|
||||
"pt_PT": "pt_XX",
|
||||
"sv_SE": "sv_SE",
|
||||
"sw_KE": "sw_KE",
|
||||
"ta_IN": "ta_IN",
|
||||
"te_IN": "te_IN",
|
||||
"th_TH": "th_TH",
|
||||
"tl_PH": "tl_XX",
|
||||
"uk_UA": "uk_UA",
|
||||
"ur_PK": "ur_PK",
|
||||
"xh_ZA": "xh_ZA",
|
||||
"gl_ES": "gl_ES",
|
||||
"sl_SI": "sl_SI"
|
||||
},
|
||||
"help": [
|
||||
{
|
||||
"title": "[Hugging Face] mBART-50 many to one multilingual machine translation",
|
||||
"url": "https://huggingface.co/facebook/mbart-large-50-many-to-one-mmt"
|
||||
},
|
||||
{
|
||||
"title": "[prompt-all-in-one Wiki] Translation API Description / 翻译接口说明",
|
||||
"url": "https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#translation-api-description"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue