Update README.md
Browse files
README.md
CHANGED
@@ -10,12 +10,12 @@ To initialize the model:
|
|
10 |
|
11 |
|
12 |
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
|
13 |
-
model = MBartForConditionalGeneration.from_pretrained("
|
14 |
|
15 |
|
16 |
To generate text using the model:
|
17 |
|
18 |
|
19 |
-
tokenizer = MBart50TokenizerFast.from_pretrained("
|
20 |
input = tokenizer("I was here yesterday to studying",text_target="I was here yesterday to study", return_tensors='pt')
|
21 |
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"])
|
|
|
10 |
|
11 |
|
12 |
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
|
13 |
+
model = MBartForConditionalGeneration.from_pretrained("MRNH/finetuned-mbart-it-gec", output_hidden_states=True)
|
14 |
|
15 |
|
16 |
To generate text using the model:
|
17 |
|
18 |
|
19 |
+
tokenizer = MBart50TokenizerFast.from_pretrained("MRNH/finetuned-mbart-it-gec", src_lang="it_IT", tgt_lang="it_IT")
|
20 |
input = tokenizer("I was here yesterday to studying",text_target="I was here yesterday to study", return_tensors='pt')
|
21 |
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"])
|