Update README.md
Browse files
README.md
CHANGED
@@ -16,12 +16,12 @@ To initialize the model:
|
|
16 |
|
17 |
|
18 |
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
|
19 |
-
model = MBartForConditionalGeneration.from_pretrained("MRNH/mbart-english-
|
20 |
|
21 |
|
22 |
To generate text using the model:
|
23 |
|
24 |
|
25 |
-
tokenizer = MBart50TokenizerFast.from_pretrained("MRNH/mbart-english-
|
26 |
input = tokenizer("I was here yesterday to studying",text_target="I was here yesterday to study", return_tensors='pt')
|
27 |
output = model.generate(input["input_ids"],attention_mask=input["attention_mask"],forced_bos_token_id=tokenizer_it.lang_code_to_id["en_XX"])
|
|
|
16 |
|
17 |
|
18 |
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
|
19 |
+
model = MBartForConditionalGeneration.from_pretrained("MRNH/mbart-english-grammar-corrector")
|
20 |
|
21 |
|
22 |
To generate text using the model:
|
23 |
|
24 |
|
25 |
+
tokenizer = MBart50TokenizerFast.from_pretrained("MRNH/mbart-english-grammar-corrector", src_lang="en_XX", tgt_lang="en_XX")
|
26 |
input = tokenizer("I was here yesterday to studying",text_target="I was here yesterday to study", return_tensors='pt')
|
27 |
output = model.generate(input["input_ids"],attention_mask=input["attention_mask"],forced_bos_token_id=tokenizer_it.lang_code_to_id["en_XX"])
|