Skip to content

Instantly share code, notes, and snippets.

@EricFillion
Last active March 17, 2023 07:00
Show Gist options
  • Save EricFillion/e0205f9cb9f501191384cf917a9df0f3 to your computer and use it in GitHub Desktop.
Save EricFillion/e0205f9cb9f501191384cf917a9df0f3 to your computer and use it in GitHub Desktop.
GPT-Neo For Answering Questions
# pip install happytransformer
from happytransformer import HappyGeneration
happy_gen = HappyGeneration("GPT-NEO", "EleutherAI/gpt-neo-125M")
result = happy_gen.generate_text("What is natural language processing?")
print(result.text)
# ----------------------------
# Result:
# Natural language processing (NLP) is a branch of computer science that uses computer language to describe the way in which a language is processed. NLP is a branch of computer science that uses computer language to describe the way in which a language
@atultanna88
Copy link

What is the length of the answers it produces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment