jbochi commited on
Commit
e22ae25
1 Parent(s): 336d99b

Fix code example

Browse files
Files changed (1) hide show
  1. README.md +6 -2
README.md CHANGED
@@ -484,11 +484,15 @@ Find below some example scripts on how to use the model:
484
  <details>
485
  <summary> Click to expand </summary>
486
 
 
 
 
 
487
  ```python
488
- from transformers import T5ForConditionalGeneration, T5Tokenizer, GenerationConfig
489
 
490
  model_name = 'jbochi/madlad400-10b-mt'
491
- model = T5ForConditionalGeneration.from_pretrained(model_name, device="auto")
492
  tokenizer = T5Tokenizer.from_pretrained(model_name)
493
 
494
  text = "<2pt> I love pizza!"
 
484
  <details>
485
  <summary> Click to expand </summary>
486
 
487
+ First, install the Python packages that are required:
488
+
489
+ `pip install transformers accelerate sentencepiece`
490
+
491
  ```python
492
+ from transformers import T5ForConditionalGeneration, T5Tokenizer
493
 
494
  model_name = 'jbochi/madlad400-10b-mt'
495
+ model = T5ForConditionalGeneration.from_pretrained(model_name, device_map="auto")
496
  tokenizer = T5Tokenizer.from_pretrained(model_name)
497
 
498
  text = "<2pt> I love pizza!"