Edit model card
YAML Metadata Error: "datasets[0]" with value "AI4D-Africa - Yorùbá Machine Translation Challenge" is not valid. It should not contain any whitespace. If possible, use a dataset id from the huggingface Hub.
YAML Metadata Error: "language" must only contain lowercase characters
YAML Metadata Error: "language" with value "Yorùbá" is not valid. It must be an ISO 639-1, 639-2 or 639-3 code (two/three letters), or a special value like "code", "multilingual". If you want to use BCP-47 identifiers, you can specify them in language_bcp47.

Predicting English Translation

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

# Loading tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("kingabzpro/Helsinki-NLP-opus-yor-mul-en")
model = AutoModelForSeq2SeqLM.from_pretrained("kingabzpro/Helsinki-NLP-opus-yor-mul-en").to('cuda')

# Prediction
a = model.generate(**tokenizer.prepare_seq2seq_batch('Nínú ìpè kan lẹ́yìn ìgbà náà, wọ́n sọ fún aṣojú iléeṣẹ́ BlaBlaCar pé ètò náà ti yí padà, pé',return_tensors='pt').to('cuda'))
text = tokenizer.batch_decode(a)

# Cleaning text
text = str(text)
text = re.sub("<pad> ","",text)
text = re.sub("'","",text)
text = text.replace("[", "")
text = text.replace("]", "")


'In a statement after that hearing, the BualaCard’s representative was told that the event had changed, that he had turned up.'



Downloads last month
Hosted inference API
This model can be loaded on the Inference API on-demand.