Suchinthana commited on
Commit
031f222
1 Parent(s): 8cc7e45

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -0
README.md CHANGED
@@ -1,3 +1,47 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - si
5
+ widget:
6
+ - text: 'writeWiki: මානව ආහාර'
7
+ - text: 'writeWiki: ගෝලීයකරණය'
8
+ - text: 'writeWiki: ජංගම දුරකථනය'
9
+ - text: 'writeWiki: ඇස්කිමෝවරු'
10
+ - text: 'writeWiki: අනුරාධපුරය'
11
+ datasets:
12
+ - wikipedia
13
  ---
14
+ ### Fine tuned MT5 base model with Sinhala Wikipedia Dataset
15
+
16
+ This model is fine tuned with articles from Sinhala Wikipedia for article generation. Used around 10,000 articles for training and fine tuned more than 100 times.
17
+
18
+ ### How to use
19
+
20
+ We have to use **"writeWiki: "** part at the begining of each prompt.
21
+
22
+ You can use this model with a pipeline for text generation.
23
+
24
+ First you might need to install required libraries and import them.
25
+ ```py
26
+ !pip uninstall transformers -y
27
+ !pip install transformers
28
+
29
+ pip install tokenizers sentencepiece
30
+ ```
31
+
32
+ Then we might need to restart the runtime either manually or use the below code to end it.
33
+ ```py
34
+ import os
35
+ os.kill(os.getpid(), 9)
36
+ ```
37
+
38
+ Then we just have to import the tokenizer and run the pipeline:
39
+
40
+ ```py
41
+ from transformers import AutoTokenizer
42
+ tokenizer = AutoTokenizer.from_pretrained('google/mt5-base')
43
+
44
+ from transformers import pipeline
45
+ generator = pipeline(model='Suchinthana/MT5-Sinhala-Wikigen-Experimental', tokenizer=tokenizer)
46
+ generator("writeWiki: මානව ආහාර", do_sample=True, max_length=180)
47
+ ```