matteo
commited on
Commit
·
66121d4
1
Parent(s):
797e476
Update README.md
Browse files
README.md
CHANGED
@@ -15,7 +15,6 @@ 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 |
-
|
19 |
-
output = hidden_states = model.generate(input_ids,attention_mask=
|
20 |
-
num_beams=4,forced_bos_token_id=tokenizer_it.lang_code_to_id["it_IT"])
|
21 |
|
|
|
15 |
|
16 |
|
17 |
tokenizer = MBart50TokenizerFast.from_pretrained("facebook/mbart-large-50", src_lang="it_IT", tgt_lang="it_IT")
|
18 |
+
input = tokenizer("I was here yesterday to studying",text_target="I was here yesterday to study", return_tensors='pt')
|
19 |
+
output = hidden_states = model.generate(input["input_ids"],attention_mask=input["attention_mask"],forced_bos_token_id=tokenizer_it.lang_code_to_id["it_IT"])
|
|
|
20 |
|