gpt2-kurdish / README.md
bayandorian's picture
Update README.md
b53ebf8 verified
metadata
license: mit
language:
  - ku
base_model: openai-community/gpt2
pipeline_tag: text-generation
library_name: transformers

use this :

from transformers import pipeline,GPT2Tokenizer
test_input = "حەزم"
tokenizer = GPT2Tokenizer.from_pretrained("bayandorian/gpt2-kurdish")
generator = pipeline('text-generation', model='bayandorian/gpt2-kurdish',device="cuda")
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)
print(sample)