/hpqa

🪄 Harry Potter QA with GPT 🤖

Primary LanguagePythonMIT LicenseMIT

hpqa – 🪄 Harry Potter QA with GPT 🤖

harry-potter-sorcerer-stone


Overview

This application gives OpenAI's GPT-3 access to all the Harry Potter books (plus the associated Wikipedia plot summaries) and lets you ask it questions. You can give the model more butterbeer (i.e., increase the temperature 😉) to make its answers more unpredictable 🍻.

Under the hood, we index the text using Faiss and streamline interactions with GPT using LangChain.

Note: To use the app, you'll need an OpenAI API key.

Try the app on 🤗 Spaces

👉 https://huggingface.co/spaces/johnnygreco/the-gpt-who-lived

Installation

git clone https://github.com/johnnygreco/hpqa.git
cd hpqa
python -m pip install -e .

Running the app

python app.py
gradio-demo