Someman commited on
Commit
915b89b
1 Parent(s): edb7fe1

updated readme.md

Browse files
Files changed (1) hide show
  1. README.md +49 -10
README.md CHANGED
@@ -1,30 +1,69 @@
1
  ---
 
2
  license: mit
3
  tags:
4
  - generated_from_trainer
5
- model-index:
6
- - name: gpt2-medium-ne
7
- results: []
 
 
8
  ---
9
 
10
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
11
- should probably proofread and complete it, then remove this comment. -->
12
-
13
  # gpt2-medium-ne
14
 
15
- This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
16
 
17
  ## Model description
18
 
19
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- ## Intended uses & limitations
22
 
23
  More information needed
24
 
25
  ## Training and evaluation data
26
 
27
- More information needed
28
 
29
  ## Training procedure
30
 
 
1
  ---
2
+ language: ne
3
  license: mit
4
  tags:
5
  - generated_from_trainer
6
+ - gpt2
7
+ - ne
8
+ datasets: Oscar
9
+ widget:
10
+ - text: "गर्मि मौसममा चिसो खाने"
11
  ---
12
 
 
 
 
13
  # gpt2-medium-ne
14
 
15
+ This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on Oscar Dataset.
16
 
17
  ## Model description
18
 
19
+ This model is trained on Oscar Nepali Dataset.
20
+
21
+ ## How to use
22
+
23
+ You can use this model directly with a pipeline for text generation.
24
+
25
+ ```python
26
+ >>> from transformers import pipeline, set_seed
27
+ >>> generator = pipeline('text-generation', model='Someman/gpt2-medium-ne')
28
+ >>> set_seed(42)
29
+ >>> generator("उच्च अदालतले बिहीबार दिएको आदेशले", max_length=30, num_return_sequences=5)
30
+
31
+ [{'generated_text': 'उच्च अदालतले बिहीबार दिएको आदेशले महिनात्रि'},
32
+ {'generated_text': 'उच्च अदालतले बिहीबार दिएको आदेशले बिहानैदे'},
33
+ {'generated_text': 'उच्च अदालतले बिहीबार दिएको आदेशले गिरिजाली'},
34
+ {'generated_text': 'उच्च अदालतले बिहीबार दिएको आदेशले गरेको प्रथम त'},
35
+ {'generated_text': 'उच्च अदालतले बिहीबार दिएको आदेशले कुनै साथी'}]
36
+ ```
37
+
38
+
39
+ Here is how to use this model to get the features of a given text in PyTorch:
40
+
41
+ ```python
42
+ from transformers import GPT2Tokenizer, GPT2Model
43
+ tokenizer = GPT2Tokenizer.from_pretrained('Someman/gpt2-medium-ne')
44
+ model = GPT2Model.from_pretrained('Someman/gpt2-medium-ne')
45
+ text = "Replace me by any text you'd like."
46
+ encoded_input = tokenizer(text, return_tensors='pt')
47
+ output = model(**encoded_input)
48
+ ```
49
+
50
+ and in TensorFlow:
51
+
52
+ ```python
53
+ from transformers import GPT2Tokenizer, TFGPT2Model
54
+ tokenizer = GPT2Tokenizer.from_pretrained('Someman/gpt2-medium-ne')
55
+ model = TFGPT2Model.from_pretrained('Someman/gpt2-medium-ne')
56
+ text = "Replace me by any text you'd like."
57
+ encoded_input = tokenizer(text, return_tensors='tf')
58
+ output = model(encoded_input)
59
+ ```
60
 
 
61
 
62
  More information needed
63
 
64
  ## Training and evaluation data
65
 
66
+ Training data contains 197k Nepali sentences.
67
 
68
  ## Training procedure
69