Edit model card

opus-mt-es-en model finetuned on the Europarl parallel[Portuguese-English] corpus extracted from the proceedings of the European Parliament source-language: Spanish, Portuguese

target-language: English


from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("salesken/translation-spanish-and-portuguese-to-english")
model = AutoModelForSeq2SeqLM.from_pretrained("salesken/translation-spanish-and-portuguese-to-english")
snippet = "Eu estou falando em L�ngua Portuguesa."
inputs = tokenizer.encode(
    snippet, return_tensors="pt",padding=True,max_length=512,truncation=True)
outputs = model.generate(
    inputs, max_length=128, num_beams=None, early_stopping=True)
translated = tokenizer.decode(outputs[0]).replace('<pad>',"").strip().lower()
print(translated)
# I am speaking in Portuguese language
Downloads last month
951
Hosted inference API
Translation
Examples
This model can be loaded on the Inference API on-demand.

Spaces using salesken/translation-spanish-and-portuguese-to-english 3