Downloads · 30 days
34
2% of all-time downloads
kyryl0s/gpt2-uk-zno-edition
gpt2-uk-zno-edition is a text generation model from kyryl0s. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as afl-3.0.
Generated texts are not very cohesive yet but I'm working on it. <br / The Hosted inference API outputs (on the right) are too short for some reason. Trying to fix it. <br / Use the code from the example below. The mo…
Downloads · 30 days
34
2% of all-time downloads
All-time downloads
1.8K
Public
Repo size
1 GB
Likes
2
Public
Click a slice to open those files.
.bin510 MB · 100%
From the Hugging Face model README
Generated texts are not very cohesive yet but I'm working on it. <br /> The Hosted inference API outputs (on the right) are too short for some reason. Trying to fix it. <br /> Use the code from the example below. The model takes "ZNOTITLE: your essay title" inputs.
from transformers import AlbertTokenizer, GPT2LMHeadModel
tokenizer = AlbertTokenizer.from_pretrained("kyryl0s/gpt2-uk-zno-edition")
model = GPT2LMHeadModel.from_pretrained("kyryl0s/gpt2-uk-zno-edition")
input_ids = tokenizer.encode("ZNOTITLE: За яку працю треба більше поважати людину - за фізичну чи інтелектуальну?", add_special_tokens=False, return_tensors='pt')
outputs = model.generate(
input_ids,
do_sample=True,
num_return_sequences=1,
max_length=250
)
for i, out in enumerate(outputs):
print("{}: {}".format(i, tokenizer.decode(out)))