Update README.md
Browse files
README.md
CHANGED
@@ -19,14 +19,15 @@ The Simbolo's Myanmarsar-GPT symbol is trained on a dataset of 1 million Burmese
|
|
19 |
### How to use
|
20 |
|
21 |
```python
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
pipe = pipeline('text-generation',model='Simbolo-Servicio/myanmar-burmese-gpt', tokenizer='Simbolo-Servicio/myanmar-burmese-gpt')
|
27 |
-
pipe('မြန်မာဘာသာစကား')
|
28 |
-
#
|
29 |
|
|
|
|
|
|
|
|
|
30 |
```
|
31 |
### Data
|
32 |
The data utilized comprises 1 million sentences sourced from Wikipedia.
|
|
|
19 |
### How to use
|
20 |
|
21 |
```python
|
22 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
23 |
|
24 |
+
tokenizer = AutoTokenizer.from_pretrained("Simbolo-Servicio/Myanmarsar-GPT")
|
25 |
+
model = AutoModelForCausalLM.from_pretrained("Simbolo-Servicio/Myanmarsar-GPT")
|
|
|
|
|
|
|
26 |
|
27 |
+
input_text = ""
|
28 |
+
input_ids = tokenizer.encode(input_text, return_tensors='pt')
|
29 |
+
output = model.generate(input_ids, max_length=50)
|
30 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
31 |
```
|
32 |
### Data
|
33 |
The data utilized comprises 1 million sentences sourced from Wikipedia.
|