File size: 317 Bytes
91a91fd
 
3c0e4f9
91a91fd
3c0e4f9
 
 
 
 
1
2
3
4
5
6
7
8
9
# Use a pipeline as a high-level helper
from transformers import pipeline
import os

HF_TOKEN = os.getenv("TOKEN")
translator = pipeline("translation",
                      model="PaulineSanchez/autotrain-translation_food_english_to_french-52830124391",
                      token = HF_TOKEN
                      )