from transformers import pipeline translator = pipeline("translation_en_to_fr", model="t5-small") print(translator("Machine learning is amazing."))