MRNH commited on
Commit
7d2fe2d
1 Parent(s): f81896f

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -0
README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ pipeline_tag: translation
5
+ metrics:
6
+ - f1
7
+ tags:
8
+ - grammatical error correction
9
+ - GEC
10
+ - italian
11
+ ---
12
+
13
+ This is a fine-tuned version of Multilingual Bart trained on English in particular on the public dataset FCE for Grammatical Error Correction.
14
+
15
+ To initialize the model:
16
+
17
+
18
+ from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
19
+ model = MBartForConditionalGeneration.from_pretrained("MRNH/finetuned-mbart-en-gec")
20
+
21
+
22
+ To generate text using the model:
23
+
24
+
25
+ tokenizer = MBart50TokenizerFast.from_pretrained("MRNH/finetuned-mbart-en-gec", 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"])