A chatbot which can answer C++ questions based on data collected from Stack Overflow.
- Command line inteface for easier data collection, training, and deleting of files.
- Alternate responses.
- Rating responses.
- Responsive design.
There is a live demo of the project at https://ligh7bringer.pythonanywhere.com/.
Branch | CI | Code coverage | Requirements | Maintainability |
---|---|---|---|---|
master | ||||
development |
- Python 3.6 or newer
- pip
- Clone this repo and
cd Chatbot/
pip install -r requirements.txt
(you may want to create a virtual environment before running this command)- Environment variables required by Flask are set automatically (thanks to .flaskenv)
After installing the required libraries, your options are:
flask --help
- shows the available commandsflask crawl
- collects data from Stack Overflow which can be later used for training the bot (stored in chatbot/training_data/). Optional command line arguments are:-t, --threads <number of threads to be used>
-p, --pages <number of pages to be crawled by each thread>
-v, --verbose
- verbose command line output
flask clean
- deletes the data collected withflask crawl
(stored in chatbot/training_data/)-y, --yes
- don't ask for confirmation
flask train
- requires data collected from thecrawl
command and trains the chatbot using itflask del_db
- deletes the database generated after training the chatbot-y, --yes
- don't ask for confirmation
flask run
- runs a local server. The website can be accessed at 127.0.0.1:5000
Unit tests can be run from the root folder of the project with the command pytest
after installing the dependencies.