File size: 3,567 Bytes
43d7d48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
"""
π£οΈ Translator - Translate text from one language to another.
MODELS list all available models.
Author:
- @ChainYo
"""
MODELS = {
"πΊπΈ English->πΊπΈ English": [0,],
"πΊπΈ English->π«π· French": ["Helsinki-NLP/opus-mt-en-fr", "https://huggingface.co/Helsinki-NLP/opus-mt-en-fr"],
"πΊπΈ English->π©πͺ German": ["Helsinki-NLP/opus-mt-en-de", "https://huggingface.co/Helsinki-NLP/opus-mt-en-de"],
"πΊπΈ English->πͺπΈ Spanish": ["Helsinki-NLP/opus-mt-en-es", "https://huggingface.co/Helsinki-NLP/opus-mt-en-es"],
"πΊπΈ English->π·πΊ Russian": ["Helsinki-NLP/opus-mt-en-ru", "https://huggingface.co/Helsinki-NLP/opus-mt-en-ru"],
"πΊπΈ English->π¨π³ Chinese": ["Helsinki-NLP/opus-mt-en-zh", "https://huggingface.co/Helsinki-NLP/opus-mt-en-zh"],
"π«π· French->π«π· French": [0, None],
"π«π· French->πΊπΈ English": ["Helsinki-NLP/opus-mt-fr-en", "https://huggingface.co/Helsinki-NLP/opus-mt-fr-en"],
"π«π· French->π©πͺ German": ["Helsinki-NLP/opus-mt-fr-de", "https://huggingface.co/Helsinki-NLP/opus-mt-fr-de"],
"π«π· French->πͺπΈ Spanish": ["Helsinki-NLP/opus-mt-fr-es", "https://huggingface.co/Helsinki-NLP/opus-mt-fr-es"],
"π«π· French->π·πΊ Russian": ["Helsinki-NLP/opus-mt-fr-ru", "https://huggingface.co/Helsinki-NLP/opus-mt-fr-ru"],
"π«π· French->π¨π³ Chinese": [None, None],
"πͺπΈ Spanish->πͺπΈ Spanish": [0, None],
"πͺπΈ Spanish->πΊπΈ English": ["Helsinki-NLP/opus-mt-es-en", "https://huggingface.co/Helsinki-NLP/opus-mt-es-en"],
"πͺπΈ Spanish->π©πͺ German": ["Helsinki-NLP/opus-mt-es-de", "https://huggingface.co/Helsinki-NLP/opus-mt-es-de"],
"πͺπΈ Spanish->π«π· French": ["Helsinki-NLP/opus-mt-es-fr", "https://huggingface.co/Helsinki-NLP/opus-mt-es-fr"],
"πͺπΈ Spanish->π·πΊ Russian": ["Helsinki-NLP/opus-mt-es-ru", "https://huggingface.co/Helsinki-NLP/opus-mt-es-ru"],
"πͺπΈ Spanish->π¨π³ Chinese": ["Helsinki-NLP/opus-tatoeba-es-zh", "https://huggingface.co/Helsinki-NLP/opus-tatoeba-es-zh"],
"π©πͺ German->π©πͺ German": [0, None],
"π©πͺ German->πΊπΈ English": ["Helsinki-NLP/opus-mt-de-en", "https://huggingface.co/Helsinki-NLP/opus-mt-de-en"],
"π©πͺ German->πͺπΈ Spanish": ["Helsinki-NLP/opus-mt-de-es", "https://huggingface.co/Helsinki-NLP/opus-mt-de-es"],
"π©πͺ German->π«π· French": ["Helsinki-NLP/opus-mt-de-fr", "https://huggingface.co/Helsinki-NLP/opus-mt-de-fr"],
"π©πͺ German->π·πΊ Russian": [None, None],
"π©πͺ German->π¨π³ Chinese": ["Helsinki-NLP/opus-mt-de-ZH", "https://huggingface.co/Helsinki-NLP/opus-mt-de-ZH"],
"π·πΊ Russian->π·πΊ Russian": [0, None],
"π·πΊ Russian->πΊπΈ English": ["Helsinki-NLP/opus-mt-ru-en", "https://huggingface.co/Helsinki-NLP/opus-mt-ru-en"],
"π·πΊ Russian->πͺπΈ Spanish": ["Helsinki-NLP/opus-mt-ru-es", "https://huggingface.co/Helsinki-NLP/opus-mt-ru-es"],
"π·πΊ Russian->π«π· French": ["Helsinki-NLP/opus-mt-ru-fr", "https://huggingface.co/Helsinki-NLP/opus-mt-ru-fr"],
"π·πΊ Russian->π©πͺ German": [None, None],
"π¨π³ Chinese->πΊπΈ English": ["Helsinki-NLP/opus-mt-zh-en", "https://huggingface.co/Helsinki-NLP/opus-mt-zh-en"],
"π¨π³ Chinese->πͺπΈ Spanish": [None, None],
"π¨π³ Chinese->π«π· French": [None, None],
"π¨π³ Chinese->π¨π³ Chinese": [0, None],
"π¨π³ Chinese->π©πͺ German": [None, None],
}
|