This is an open source bot useful for querying information related to Novel Coronavirus (COVID-19).
Table of Contents
This is an open source bot useful for querying information related to Novel Coronavirus (COVID-19) for India.
You can refer to the attached clip on how to use the COVID-INDIA Bot.
Video demonstration (click the picture):
The data mainly comes from
- M-Media-Group/Covid-19-API repository.
- Co-WIN Public APIs
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
- Python
- Pipenv
- Docker
- Helm
- Kubernetes
-
Clone the repository
git clone https://github.com/sumanentc/COVID-19-bot.git
-
Using RASA Shell and Stand alone Action Server
- Install dependencies
pipenv shell pipenv install
- Train the model
rasa train
- Start the Action Server
rasa run actions -vv
- Start the RASA shell
rasa shell -v
- 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
- 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
- Build Rasa NLU Docker image
docker build . -t sumand/rasa-server:2.8.0
docker push sumand/rasa-server:2.8.0
- Start the NLU Container
docker-compose up
- 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
- 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
- Build Rasa NLU Docker image
docker build . -t sumand/rasa-server:2.8.0
docker push sumand/rasa-server:2.8.0
- 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
- 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
Upload the model after login and make the model active
Please respect the OPEN API Policy Usage
Distributed under the MIT License. See LICENSE
for more information.