Translator / available_models.py
Thomas Chaigneau
add docstrings
a2a09d6
"""
🗣️ 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"],
"🇫🇷 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"],
"🇪🇸 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"],
"🇩🇪 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],
"🇷🇺 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],
}