Translation

Translation is the task of converting text written in one language into another language. You have the option to select from over 2000 models available on the Hugging Face hub for translation.

content_copy link edit
select pgml.transform(
inputs => array[
'How are you?'
],
task => '{"task": "translation",
"model": "Helsinki-NLP/opus-mt-en-fr"
}'::JSONB
);

Result

content_copy link edit
[
{"translation_text": "Comment allez-vous ?"}
]