Hi All,
I’m very inexperienced at coding, but I’m trying to machine translate using NMT some sentences for a Political Science article I am writing. And for many quasi sentences I am encountering the following:
Exception: Helsinki-NLP/opus-mt-no-en is not a local folder and is not a valid model identifier listed on ‘Models - Hugging Face’
If this is a private repository, make sure to pass a token having permission to this repo with use_auth_token
or log in with huggingface-cli login
and pass use_auth_token=True
.
Does anyone have any advice? I am using RStudio and the reticulate package. This is the very basic python code I have written:
from easynmt import EasyNMT
model = EasyNMT(‘opus-mt’, max_loaded_models=10)
def translate(text, lang):
if(lang != ‘english’):
return model.translate(text, target_lang=‘en’)
return text
I encountered the issue for most Norwegian sentences I was trying to translate, but sporadically for other languages I am encountering the same…
Any help would be very much appreciated!