matteo
commited on
Commit
·
797e476
1
Parent(s):
dc91eb2
Update README.md
Browse files
README.md
CHANGED
@@ -15,6 +15,7 @@ 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
|
19 |
-
output = model.generate(input_ids
|
|
|
20 |
|
|
|
15 |
|
16 |
|
17 |
tokenizer = MBart50TokenizerFast.from_pretrained("facebook/mbart-large-50", src_lang="it_IT", tgt_lang="it_IT")
|
18 |
+
input_ids = 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_ids,attention_mask=mask,max_length=max_length,
|
20 |
+
num_beams=4,forced_bos_token_id=tokenizer_it.lang_code_to_id["it_IT"])
|
21 |
|