Spaces:
Runtime error
Runtime error
from transformers import GPTNeoForCausalLM, GPT2Tokenizer | |
"EleutherAI/gpt-neo-1.3B") | model = GPTNeoForCausalLM.from_pretrained(|
"EleutherAI/gpt-neo-1.3B") | tokenizer = GPT2Tokenizer.from_pretrained(|
"In a shocking finding, scientists discovered a herd of unicorns living in a remote, " \ | prompt =|
"previously unexplored valley, in the Andes Mountains. Even more surprising to the " \ | |
"researchers was the fact that the unicorns spoke perfect English." | |
"pt").input_ids | input_ids = tokenizer(prompt, return_tensors=|
True, temperature=0.9, max_length=100,) | gen_tokens = model.generate(input_ids, do_sample=|
0] | gen_text = tokenizer.batch_decode(gen_tokens)[