rish-16 / gpt2client

✍🏻 gpt2-client: Easy-to-use TensorFlow Wrapper for GPT-2 117M, 345M, 774M, and 1.5B Transformer Models 🤖 📝
MIT License
372 stars 74 forks source link

Prompt + Custom dataset #27

Closed ShaunLWM closed 4 years ago

ShaunLWM commented 4 years ago

How do I generate text with prompts from custom trained data?

I have tried

my_corpus = './3cleewh.txt' # path to corpus
gpt2.finetune(my_corpus)
prompts = [
    "What do you think of the taxi driver?",
]

text = gpt2.generate_batch_from_prompts(prompts)
print (text)

But I think this generates text from its own corpus instead of mine. Thank you.

Edit: I tried replacing the files in 345M folder with my custom trained files, but the same problem occurs.

rish-16 commented 4 years ago

Hey,

Thanks for the headsup. Will look into this issue. I'm still finding workarounds to a few internal problems.