Code to interact with ChatGPT API. The aim was to gain first hand experience working with the new chat completion API provided by API and also learning Gradio.
You need to get your own OpenAI api key. You can find it over here Simply create a new API key and write in .env file in the root of the repo in the following format:
API_KEY=YOUR_KEY_HERE
The installation is managed by poetry. You can simply install them by:
pip install poetry
poetry env use python3.10
poetry shell
poetry install
The application can be run using the following command:
python summarize.py
A simple demo of the summarizer can be found here: