Update README.md
Browse files
README.md
CHANGED
@@ -5,4 +5,17 @@ language:
|
|
5 |
base_model: openai-community/gpt2
|
6 |
pipeline_tag: text-classification
|
7 |
library_name: transformers
|
8 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
base_model: openai-community/gpt2
|
6 |
pipeline_tag: text-classification
|
7 |
library_name: transformers
|
8 |
+
---
|
9 |
+
|
10 |
+
use this :<br/>
|
11 |
+
<br/>
|
12 |
+
from transformers import pipeline,GPT2Tokenizer<br/>
|
13 |
+
test_input = "حەزم"<br/>
|
14 |
+
tokenizer = GPT2Tokenizer.from_pretrained("bayandorian/gpt2-kurdish")<br/>
|
15 |
+
generator = pipeline('text-generation', model='bayandorian/gpt2-kurdish',device="cuda")<br/>
|
16 |
+
sample = generator(test_input, temperature=1.2, top_k=50, top_p=0.9, repetition_penalty=1.2, pad_token_id = tokenizer.eos_token_id)<br/>
|
17 |
+
print(sample)<br/>
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
|