shihab17 commited on
Commit
1517954
1 Parent(s): bdae6e5

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -0
README.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ pipeline_tag: translation
4
+ ---
5
+ ### How to use
6
+
7
+ You can use this model directly with a pipeline:
8
+
9
+
10
+ ```python
11
+ from transformers import AutoTokenizer, pipeline
12
+ tokenizer = AutoTokenizer.from_pretrained("shihab17/bengali-bn-to-en")
13
+ model = AutoModelForSeq2SeqLM.from_pretrained("shihab17/bengali-bn-to-en")
14
+
15
+ sentence = 'ম্যাচ শেষে পুরস্কার বিতরণের মঞ্চে তামিমের মুখে মোস্তাফিজের প্রশংসা শোনা গেল'
16
+
17
+ translator = pipeline("translation_en_to_bn", model=model, tokenizer=tokenizer)
18
+ output = translator(sentence)
19
+ print(output)
20
+ ```