Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Chatbot prototype for restaurants reservation using the DeepPavlov NLU.

Notifications You must be signed in to change notification settings

ehrhart/deeppavlov-restaurants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deeppavlov-chatbot

Requirements

  • Python (>=3.6)
  • Node (>=v8)
  • Linux or Windows (installation for Windows requires git and Visual Studio 2015/2017 with C++ build tools installed!)

Installation

  1. Clone this repository or download the latest version.

  2. 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
  3. Install the Python requirements:

    pip install -r requirements.txt
    
  4. Download and install spacy en_core_web_sm:

    python -m spacy download en_core_web_sm
    
  5. Download and install DeepPavlov datasets for intent classification:

    python -m deeppavlov download model_config.json
    python -m deeppavlov download intents.json
    
  6. Now install the frontend dependencies:

    cd ../chatbot
    npm install
    

Running the chatbot

  1. 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/.

  2. Launch the frontend server:

    cd chatbot
    PORT=3000 npm start

    You should be able to access the web chat interface at http://localhost:3000/.

Training the models

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.

Intent model

python -m deeppavlov train intents.json

Entities model

python -m deeppavlov train ner.json

Docker

docker build -t ehrhart/deeppavlov-restaurants/chatbot . docker run -p 3000:3000 -d ehrhart/deeppavlov-restaurants/chatbot

About

Chatbot prototype for restaurants reservation using the DeepPavlov NLU.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published