aryaumesh commited on
Commit
22c4d45
1 Parent(s): 7c733b5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -3
README.md CHANGED
@@ -1,3 +1,20 @@
1
- ---
2
- license: cc0-1.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc0-1.0
3
+ ---
4
+ A model that translates English sentences to Marathi
5
+
6
+ To use this model, use the following code:
7
+
8
+ ```python
9
+ from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
10
+ model_checkpoint = "aryaumesh/english-to-marathi"
11
+
12
+ tokenizer = MBart50TokenizerFast.from_pretrained(model_checkpoint)
13
+ model = MBartForConditionalGeneration.from_pretrained(model_checkpoint)
14
+
15
+ text = "This is a test case." # Sentence to translate
16
+ inputs = tokenizer(text, return_tensors="pt")
17
+
18
+ outputs = model.generate(**inputs)
19
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True)) # ఈ ఒక పరీక్ష కేసు ఉంది.
20
+ ```