matteo commited on
Commit
5aedc32
1 Parent(s): ccc5c42

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -0
README.md CHANGED
@@ -3,3 +3,18 @@ language:
3
  - it
4
  pipeline_tag: translation
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  - it
4
  pipeline_tag: translation
5
  ---
6
+
7
+ To initialize the model:
8
+
9
+ ```python
10
+ from transformers import MBartForConditionalGeneration
11
+
12
+ model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50", output_hidden_states=True)
13
+ ```
14
+
15
+ To generate text using the model:
16
+
17
+ ```python
18
+ input_ids = tokenizer.encode("Input text", return_tensors="pt")
19
+ output = model.generate(input_ids)
20
+ ```