diff --git a/docs/source/en/tasks/translation.md b/docs/source/en/tasks/translation.md index f0433a0dad..2316b19578 100644 --- a/docs/source/en/tasks/translation.md +++ b/docs/source/en/tasks/translation.md @@ -348,7 +348,10 @@ The simplest way to try out your finetuned model for inference is to use it in a ```py >>> from transformers import pipeline ->>> translator = pipeline("translation", model="my_awesome_opus_books_model") +# Change `xx` to the language of the input and `yy` to the language of the desired output. +# Examples: "en" for English, "fr" for French, "de" for German, "es" for Spanish, "zh" for Chinese, etc; translation_en_to_fr translates English to French +# You can view all the lists of languages here - https://huggingface.co/languages +>>> translator = pipeline("translation_xx_to_yy", model="my_awesome_opus_books_model") >>> translator(text) [{'translation_text': 'Legumes partagent des ressources avec des bactéries azotantes.'}] ``` diff --git a/docs/source/ja/tasks/translation.md b/docs/source/ja/tasks/translation.md index fb2c89f385..187afe2687 100644 --- a/docs/source/ja/tasks/translation.md +++ b/docs/source/ja/tasks/translation.md @@ -349,7 +349,10 @@ TensorFlow でモデルを微調整するには、オプティマイザー関数 ```py >>> from transformers import pipeline ->>> translator = pipeline("translation", model="my_awesome_opus_books_model") +# Change `xx` to the language of the input and `yy` to the language of the desired output. +# Examples: "en" for English, "fr" for French, "de" for German, "es" for Spanish, "zh" for Chinese, etc; translation_en_to_fr translates English to French +# You can view all the lists of languages here - https://huggingface.co/languages +>>> translator = pipeline("translation_xx_to_yy", model="my_awesome_opus_books_model") >>> translator(text) [{'translation_text': 'Legumes partagent des ressources avec des bactéries azotantes.'}] ``` diff --git a/docs/source/ko/tasks/translation.md b/docs/source/ko/tasks/translation.md index 6de275f7d0..29560606be 100644 --- a/docs/source/ko/tasks/translation.md +++ b/docs/source/ko/tasks/translation.md @@ -346,7 +346,10 @@ TensorFlow에서 모델을 파인튜닝하려면 우선 optimizer 함수, 학습 ```py >>> from transformers import pipeline ->>> translator = pipeline("translation", model="my_awesome_opus_books_model") +# Change `xx` to the language of the input and `yy` to the language of the desired output. +# Examples: "en" for English, "fr" for French, "de" for German, "es" for Spanish, "zh" for Chinese, etc; translation_en_to_fr translates English to French +# You can view all the lists of languages here - https://huggingface.co/languages +>>> translator = pipeline("translation_xx_to_yy", model="my_awesome_opus_books_model") >>> translator(text) [{'translation_text': 'Legumes partagent des ressources avec des bactéries azotantes.'}] ```