fragata commited on
Commit
65089b0
1 Parent(s): 313e506

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -59,4 +59,16 @@ gen_tokens = model.generate(
59
 
60
  gen_text = tokenizer.batch_decode(gen_tokens)[0]
61
  print(gen_text)
 
 
 
 
 
 
 
 
 
 
 
 
62
  ```
 
59
 
60
  gen_text = tokenizer.batch_decode(gen_tokens)[0]
61
  print(gen_text)
62
+ ```
63
+ ## Usage with pipeline
64
+
65
+ ```python
66
+ from transformers import pipeline
67
+
68
+ model = GPTNeoXForCausalLM.from_pretrained("NYTK/PULI-GPT-3SX")
69
+ tokenizer = GPTNeoXTokenizerFast.from_pretrained("NYTK/PULI-GPT-3SX")
70
+ prompt = "Elmesélek egy történetet a nyelvtechnológiáról."
71
+ generator = pipeline(task="text-generation", model=model, tokenizer=tokenizer)
72
+
73
+ print(generator(prompt)[0]["generated_text"])
74
  ```