matteo
commited on
Commit
·
dc91eb2
1
Parent(s):
2e9d7dd
Update README.md
Browse files
README.md
CHANGED
@@ -6,15 +6,15 @@ pipeline_tag: translation
|
|
6 |
|
7 |
To initialize the model:
|
8 |
|
9 |
-
|
10 |
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
|
11 |
model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50", output_hidden_states=True)
|
12 |
-
|
13 |
|
14 |
To generate text using the model:
|
15 |
|
16 |
-
|
17 |
tokenizer = MBart50TokenizerFast.from_pretrained("facebook/mbart-large-50", src_lang="it_IT", tgt_lang="it_IT")
|
18 |
input_ids = tokenizer.encode("Input text", return_tensors="pt")
|
19 |
output = model.generate(input_ids)
|
20 |
-
|
|
|
6 |
|
7 |
To initialize the model:
|
8 |
|
9 |
+
|
10 |
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
|
11 |
model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50", output_hidden_states=True)
|
12 |
+
|
13 |
|
14 |
To generate text using the model:
|
15 |
|
16 |
+
|
17 |
tokenizer = MBart50TokenizerFast.from_pretrained("facebook/mbart-large-50", src_lang="it_IT", tgt_lang="it_IT")
|
18 |
input_ids = tokenizer.encode("Input text", return_tensors="pt")
|
19 |
output = model.generate(input_ids)
|
20 |
+
|