barbaroo commited on
Commit
b6b80f0
·
verified ·
1 Parent(s): 50af9cb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -2
README.md CHANGED
@@ -57,10 +57,17 @@ pipeline_tag: translation
57
  Below is a simple usage example in Python with [Hugging Face Transformers](https://github.com/huggingface/transformers):
58
 
59
  ```python
60
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
61
 
62
  model_name = "barbaroo/nllb_200_600M_en_fo"
63
- translator = pipeline("translation", model=model_name, tokenizer=model_name)
 
 
 
 
 
 
 
64
 
65
  text = "Hello, how are you?"
66
  translation = translator(text)
 
57
  Below is a simple usage example in Python with [Hugging Face Transformers](https://github.com/huggingface/transformers):
58
 
59
  ```python
60
+ from transformers import pipeline
61
 
62
  model_name = "barbaroo/nllb_200_600M_en_fo"
63
+
64
+ translator = pipeline(
65
+ "translation",
66
+ model=model_name,
67
+ tokenizer=model_name,
68
+ src_lang="eng_Latn", # Language code for English
69
+ tgt_lang="fao_Latn" # Language code for Faroese
70
+ )
71
 
72
  text = "Hello, how are you?"
73
  translation = translator(text)