Python
(>=3.6)Node
(>=v8)Linux
orWindows
(installation forWindows
requires git andVisual Studio 2015/2017
withC++ build tools
installed!)
-
Clone this repository or download the latest version.
-
Create and activate a virtual environment:
Linux
cd nlu python -m venv env source ./env/bin/activate
Windows
cd nlu python -m venv env .\env\Scripts\activate.bat
-
Install the Python requirements:
pip install -r requirements.txt
-
Download and install spacy en_core_web_sm:
python -m spacy download en_core_web_sm
-
Download and install DeepPavlov datasets for intent classification:
python -m deeppavlov download model_config.json python -m deeppavlov download intents.json
-
Now install the frontend dependencies:
cd ../chatbot npm install
-
Launch DeepPavlov REST API:
cd nlu DP_SETTINGS_PATH=./deeppavlov-settings python -m deeppavlov riseapi model_config.json -p 4949
The swagger api docs should be available at http://localhost:4949/.
-
Launch the frontend server:
cd chatbot PORT=3000 npm start
You should be able to access the web chat interface at http://localhost:3000/.
This repository comes with pre-trained models for our chatbot. If you decide to add, remove, or modify the intents and/or the entities, you will have to re-train the models.
python -m deeppavlov train intents.json
python -m deeppavlov train ner.json
docker build -t ehrhart/deeppavlov-restaurants/chatbot . docker run -p 3000:3000 -d ehrhart/deeppavlov-restaurants/chatbot