Issue with translation to spanish

#7
by harsh8398 - opened

I ran the model to translate from en_to_de first using following code:

from transformers import pipeline
generator = pipeline("translation_en_to_de", model="t5-base")
print(generator("hello"))

It outputs:
image.png

Then I tried running the model to translate from en_to_es but it results in very wrong results:

from transformers import pipeline
generator = pipeline("translation_en_to_es", model="t5-base")
print(generator("hello"))

Output:
image.png

Is this expected behaviour?

from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("t5-small",model_max_length=512)

Sign up or log in to comment