Exception: Helsinki-NLP/opus-mt-no-en is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
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 withuse_auth_tokenor log in withhuggingface-cli loginand passuse_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 EasyNMTmodel = EasyNMT(‘opus-mt’, max_loaded_models=10)def translate(text, lang):if(lang != ‘english’):return model.translate(text, target_lang=‘en’)return textI 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!
2024-03-08T07:30:48Z
Hey! I am facing the same trouble. Were you able to fix it?
2024-03-22T06:06:55Z
hey im facing same issue is there any update on this ?
2024-03-22T07:15:42Z
@Rootx007@Sayart@nikkiBotwell this is not related tobut let’s try to break it down.what theEasyNMTlibrary does is that whenever a new text is passed to the model it will do the following identify input language example :for Norwegian language =noand you already selected the output language in hereSayart:return model.translate(text, target_lang=‘en’)output language isennowEasyNMTlibrary does is that combines these togethermodel = "Helsinki-NLP/opus-mt-" + "no" + "-" + "en"
model =  "Helsinki-NLP/opus-mt-no-en"
url = "https://huggingface.co/Helsinki-NLP/opus-mt-no-en"
# oops url does not existnow it will search huggingface for the corresponding model, and sinceHelsinki-NLPdid not upload anyno-enmodel this will ofc generate a problem since the model does not exist in huggingface in the first place.====================================================another example that is working for french and english isthismodel (french to english)input_language = "fr" 
output_language = "en"
full_model = "Helsinki-NLP/opus-mt-fr-en"
url = "https://huggingface.co/Helsinki-NLP/opus-mt-fr-en"
# then `EasyNMT` downloads the modelTLDR;Helsinki-NLP did not upload opus-mt-no-en model and this does not have anything to do with huggingface.