Skip to content

This is an open source bot for querying information about Coronavirus (COVID-19).

License

Notifications You must be signed in to change notification settings

sumanentc/COVID-19-bot

Repository files navigation

Covi-India-Bot

This is an open source bot useful for querying information related to Novel Coronavirus (COVID-19).

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Acknowledgements
  5. License

About The Project

This is an open source bot useful for querying information related to Novel Coronavirus (COVID-19) for India. RASA Shell RASA-X RASA-X

You can refer to the attached clip on how to use the COVID-INDIA Bot.

Video demonstration (click the picture):

COVID-India

The data mainly comes from

  1. M-Media-Group/Covid-19-API repository.
  2. Co-WIN Public APIs

Features

Currently, the Bot considers India and the states within.
It has the below features.

  • It answers questions related COVID-19.

    • What is the total number of deaths in india?
    • How many recovered cases are there in india
    • How many confirmed cases are there in Ind
    • What is the total number of Active cases in Maharashtra
    • What is the total number of actve cases in Maharashtra and Goa
    • How many Confirmed cases are there in West Bengal
    • Which states are Most affected
    • Which states have maximum recovered states
    • Which states have most deaths
    • Which states are Least affected ?
    • What is the Recovery rate in Karnataka
    • What is the Recovery rate in Karnataka and Goa
    • What is the Mortality rate in Goa
  • It can handle spelling mistakes.

  • It can answers questions related to vaccination.

    • Number of people patially vaccinated in India
    • Number of people fully vaccinated
  • It can answers questions related to vaccination slots availability.

    • Slots available in Pune
    • Slots available in Mumbai
    • Slots available in 400066
  • It can handle out of context questions.

    • How are you?
    • How is the weather?
  • It has RASA-X UI for Interactive training and usage

  • It supports Facebok Messanger

  • It Caches the API response for 30 min for faster response time

  • It can return Charts along with the message

Built With

Getting Started

Prerequisites

Installation

  • Clone the repository

    git clone https://github.com/sumanentc/COVID-19-bot.git
    
  • Using RASA Shell and Stand alone Action Server

    1. Install dependencies
    pipenv shell
    
    pipenv install
    
    1. Train the model
    rasa train
    
    
    1. Start the Action Server
    rasa run actions -vv
    
    
    1. Start the RASA shell
    rasa shell -v
    
    1. Start asking questions on the RASA shell
  • Using Docker Compose for Installation

Note : Here I am using my personal docker hub account to store the image: sumand

  1. Build Action Server Docker image
docker build actions/ -t sumand/rasa-action-server:2.8.0

docker push sumand/rasa-action-server:2.8.0

  1. Build Rasa NLU Docker image
docker build . -t sumand/rasa-server:2.8.0

docker push sumand/rasa-server:2.8.0
  1. Start the NLU Container
docker-compose up
  1. Test the Bot using REST API
curl -XPOST localhost:5005/webhooks/rest/webhook -d '{"sender":"Me","message":"what is the total number of deaths in india"}'
  • Install the Bot along with RASA-X UI
  1. Build Action Server Docker image
docker build actions/ -t sumand/rasa-action-server:2.8.0

docker push sumand/rasa-action-server:2.8.0

  1. Build Rasa NLU Docker image
docker build . -t sumand/rasa-server:2.8.0

docker push sumand/rasa-server:2.8.0
  1. Install RASA-X. I used Helm-Chart for installation.

3.1 Create new namespace for rasa deployment

kubectl create namespace rasa

3.2 deploy RASA-X using the Helm Chart along with the customization specified in values.yml

helm repo add rasa-x https://rasahq.github.io/rasa-x-helm

helm --namespace rasa install --values values.yml my-release rasa-x/rasa-x

3.3 Update the Helm Chart in case we need any changes

helm --namespace rasa upgrade --values values.yml my-release rasa-x/rasa-x

3.4 Delete all the deployment in case not required

helm uninstall my-release -n rasa

  1. Deploy RASA-X

After executing the above Helm Chart, check RAXA-X is deployed successfully. Execute the below commands to check if all the pods are up and running. Else check the logs of individual pods for ERROR.

kubectl get pods -n rasa

Once all the pods are up and running then the RASA-X UI can be opened using the below url. Use the Password specified in Values.yml file to login.

http://localhost:8000/login

RASA-X

Upload the model after login and make the model active

RASA-X

Usage

Please respect the OPEN API Policy Usage

Acknowledgements

License

Distributed under the MIT License. See LICENSE for more information.

About

This is an open source bot for querying information about Coronavirus (COVID-19).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published