git clone sudo https://github.com/mirfan899/rasa-qa-bot.git
cd rasa-qa-bot
Run the shell script, which will create two virtualenvs. One for Rasa and second for BERT
sudo ./setup.sh
Copy systemctl
services files to proper location
sudo cp rasa_run.service /etc/systemd/system/rasa.service
sudo cp bert_run.service /etc/systemd/system/bert.service
sudo cp rasa_actions.service /etc/systemd/system/actions.service
We need to install SpaCy.
pip3 install spacy
Install English model
python -m spacy download en_core_web_sm
python -m spacy link en_core_web_sm en
python -m rasa train
Enable the CORS for any web api. There is a shell script which and service which will run at as deamon process for
deployment. If you setting up this repository, you need to fix the paths in systemctl
service files i.e. rasa_run.service
, rasa_actions.service
bert_run.service
sudo systemctl start rasa
sudo systemctl start actions
For testing purpose run the flask app.
export FLASK_APP=app.py && flask run
sudo systemctl start bert
to stop the server
sudo systemctl stop bert
If you want to add questions to Rasa NLU Bot use this file data/nlu/qa.md
, there is a script which uses the json format for adding the question into model.
python utils/add_more_questions.py
It will look for file with name english_questions_answers.json
with format
[
{
"q": "Question here",
"a": "Answer here"
},
{
"q": "Another Question here",
"a": "Another Answer here"
}
]
this script will merge two json files containing questions and answers.
python utils/merge_json.py