The NewsGPT is an enhanced version of ChatGPT with access to a bank of news articles from 2023. It retrieves passages from the articles and uses them to answer questions or perform tasks.
To get started with the NewsGPT, follow these steps:
- Clone the repository:
git clone https://github.com/andrecharneca/news-articles-chatbot.git
- Enter the folder:
cd news-articles-chatbot
- Install the required dependencies:
pip install -r requirements.txt
- Setup your OpenAI API key:
conda env config vars set OPENAI_API_KEY=[key]
- Deactivate and activate the env, so the key takes effect.
- Run the Flask app:
python app.py
- Open your web browser and navigate to
http://127.0.0.1:5000
to use the chatbot.
- Enter a question or query in the input box on the left side.
- Click the "Submit" button.
- The system will process the question and display the response on the right side.
- Flask
- Newspaper3k (for extracting news articles)
- llama-index (querying system)
- If after some time using it you come across an error in Chrome saying "You don't have authorisation to visit this page", close and reopen Chrome.