gpt2client
gpt2client copied to clipboard
FileNotFoundError: [Errno 2] No such file or directory: 'models/117M/encoder.json'
Code:
from gpt2_client import GPT2Client
gpt2 = GPT2Client('117M')
gpt2.generate(interactive=True)
Crash:
FileNotFoundError: [Errno 2] No such file or directory: 'models/117M/encoder.json'
This error occurs for every model.
macOS Catalina 10.15
Hello there, I'll look into this at once. Thank you for highlighting this
Hey there, You need to download the model first. Try out this code snippet:
from gpt2_client import GPT2Client
gpt2 = GPT2Client('117M')
gpt2.load_model() # if you already have the model checkpoints, then it will automatically search for it and use them
gpt2.generate(interactive=True)
Hope this helps!
AttributeError: 'GPT2Client' object has no attribute 'load_model'
This should probably be fixed in the README too.
I'll go check it out thanks