Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sess not defined error #1

Open
bjayakumar opened this issue Jan 27, 2020 · 2 comments
Open

sess not defined error #1

bjayakumar opened this issue Jan 27, 2020 · 2 comments

Comments

@bjayakumar
Copy link


def _extend_conversation(conversation_as_string):
  generated_samples = gpt2.generate(
    sess,
    model_name=model_name,
    prefix=conversation_as_string,
    length=100,
    return_as_list = True
  )

I am getting error here if I run it on colab.

@bjayakumar
Copy link
Author

This is the fix:


from nltk.tokenize import sent_tokenize
import gpt_2_simple as gpt2
sess = gpt2.start_tf_sess()
model_name = "774M"
gpt2.download_gpt2(model_name=model_name)
gpt2.load_gpt2(
    sess, 
  model_name=model_name
)

@ai-nikolai
Copy link
Contributor

@bjayakumar thanks a lot for reporting the bug.

Feel free to open a PR

Otherwise, we will try and push a fix soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants