jbochi commited on
Commit
b6d3919
1 Parent(s): fd2b287

Fix code example

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