Giter VIP home page Giter VIP logo

rasa-covid19-chatbot's Introduction

Rasa-Covid19-Chatbot

This is a chatbot developed to provide information about the covid-19 cases

Checkout the Demo Video Link https://youtu.be/xJg1ObtUWWY

How to use this repo

How to set-up the environment

In ubuntu 18.04, these are steps to be followed to setup the project env

Step 1: Create a Virtual Environment

python3 -m venv myenv

Step 2: Activate the virtual env

source myenv/bin/activate

Step 3: Deactivate the conda env if it exits

conda deactivate

Step 4: Install the requirements

pip3 install -r requirements.txt

or 

pip3 install rasa==1.9.6

Training the NLU model

Since the release of Rasa 1.0, the training of the NLU models became a lot easier with the new CLI. Train the model by running:

rasa train nlu

Once the model is trained, test the model:

rasa shell nlu

Training the dialogue model

The biggest change in how Rasa Core model works is that custom action 'actions' now needs to run on a separate server. That server has to be configured in a 'endpoints.yml' file. This is how to train and run the dialogue management model:

  1. Start the custom action server by running:

rasa run actions

  1. Open a new terminal and train the Rasa Core model by running:

rasa train

  1. Talk to the chatbot once it's loaded after running:

rasa shell

Starting the interactive training session:

To run your assistant in a interactive learning session, run:

  1. Make sure the custom actions server is running:

rasa run actions

  1. Start the interactive training session by running:

rasa interactive

Steps to run the complete project

Run the below steps in different terminals

Step 1: Run the Flask server for getting covid data

python app.py

Step 2: Run the Actions Server

rasa run actions

Step 3: Run the Shell to interact with bot

rasa shell

Integration with FrontEnd Website

Step 1: Run the Actions Server

rasa run actions

Step 2: Run the rasa model

python -m rasa run --m ./models --endpoints endpoints.yml --port 5005 --cors "*" -vv --enable-api

Step 3: Run the Flask Server for backend data

python app.py

Step 4: Run the HTTP server for running website for chatbot

The chatbot UI is provided in index.html forked from another repo is also placed for individual learnings into chatbot frontend.

python -m http.server 8008

Here 8008 is port number, u can change if needed

The chatbot is ready at http://localhost:8008

Note: Still the bot needs lot of training data. We can integrate RASA-X for this purpose which is not yet added into this project.

Tasks To-Do-List

  • Create the basic project
  • Make NLU training data
  • Make the dialogue management model
  • Make a flask server to extract the covid data from https://api.covid19india.org/
  • Create the more stories
  • Handle the spelling mistakes by the users
  • Handle the date format given by the users.
  • Create a frontend application
  • Connect the frontend with the rasa-chatbot
  • Deploy the flask server.
  • Deploy the chatbot app.

References

  1. RasaMasterClass Official Youtube videos.

  2. Thanks to https://github.com/JiteshGaikwad/Chatbot-Widget for frontend-ui code.

     Along with references, detailed blogs will be posted soon ...
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.