git clone sudo https://github.com/mirfan899/rasa-qa-bot.git
cd rasa-qa-botRun the shell script, which will create two virtualenvs. One for Rasa and second for BERT
sudo ./setup.shCopy 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.serviceWe need to install SpaCy.
pip3 install spacyInstall English model
python -m spacy download en_core_web_sm
python -m spacy link en_core_web_sm enpython -m rasa trainEnable 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 actionsFor testing purpose run the flask app.
export FLASK_APP=app.py && flask runsudo systemctl start bertto stop the server
sudo systemctl stop bertIf 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.pyIt 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