MRNH commited on
Commit
2c93bf4
1 Parent(s): 2441500

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
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-grammatical-corrector")
20
 
21
 
22
  To generate text using the model:
23
 
24
 
25
- tokenizer = MBart50TokenizerFast.from_pretrained("MRNH/mbart-english-grammatical-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"])
 
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"])