MRNH commited on
Commit
65c3e67
1 Parent(s): 09e1856

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -18,12 +18,13 @@ To initialize the model:
18
  from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
19
  model = MBartForConditionalGeneration.from_pretrained("MRNH/mbart-german-grammar-corrector")
20
 
21
-
22
- To generate text using the model:
23
 
24
-
25
  tokenizer = MBart50TokenizerFast.from_pretrained("MRNH/mbart-german-grammar-corrector", src_lang="de_DE", tgt_lang="de_DE")
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["de_DE"])
28
 
29
 
 
18
  from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
19
  model = MBartForConditionalGeneration.from_pretrained("MRNH/mbart-german-grammar-corrector")
20
 
21
+ Use the tokenizer:
 
22
 
 
23
  tokenizer = MBart50TokenizerFast.from_pretrained("MRNH/mbart-german-grammar-corrector", src_lang="de_DE", tgt_lang="de_DE")
24
  input = tokenizer("I was here yesterday to studying",text_target="I was here yesterday to study", return_tensors='pt')
25
+
26
+ To generate text using the model:
27
+
28
  output = model.generate(input["input_ids"],attention_mask=input["attention_mask"],forced_bos_token_id=tokenizer_it.lang_code_to_id["de_DE"])
29
 
30