Downloads · 30 days
17
0% of all-time downloads
kingabzpro/Helsinki-NLP-opus-yor-mul-en
Helsinki-NLP-opus-yor-mul-en is a translation model from kingabzpro. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
17
0% of all-time downloads
All-time downloads
4.1K
Public
Parameters
77.1M
617 MB on disk
Likes
2
Public
Click a slice to open those files.
.bin308 MB · 50%
From the Hugging Face model README
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("]", "")
text
'In a statement after that hearing, the BualaCard’s representative was told that the event had changed, that he had turned up.'
0.3025