-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReadMe.txt
75 lines (43 loc) · 2.46 KB
/
ReadMe.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
if you have anaconda installed in your system, please run this command to activate the environment:
In Terminal: "conda env create -f environment.yml"
or just refer to requirements.txt for package version information, Python3.7.9 is used.
Mandatory to install these Spacy Models:
$ python3 -m spacy download en_core_web_md
$ python3 -m spacy link en_core_web_md en
---------- Data Files ----------
data/nlu/nlu.md : contains training examples for the NLU model
data/core/stories.md : contains training stories for the Core model
---------- Script Files ----------
zomato : contains Zomato API integration code
zomato_api.py : contains functions to consume common Zomato APIs like fetch location details, type of cuisines, search for restaurants, etc
actions.py : contains the following custom actions (insert ZOMATO API key in this script file before starting RASA server)
* search restaurant
* validate location
* validate cuisine
* send email
* restart conversation
* reset slots
nlu_test.py : contains code to test generated NLU models
rasa_train.py : * primary script file to test chatbot from CLI. Contains code to:
* train both NLU and Core model
* persist packaged model in 'models' folder
---------- Config Files ----------
config.yml: contains model configuration and custom policy
domain.yml: defines chatbot domain like entities, actions, templates, slots
endpoints.yml: contains the webhook configuration for custom action
smtpconfig.txt: contains SMTP server configuration information (If using GMAIL, setup account and generate app password) .
---------- Usage ----------
*** To Invoke Chatbot in Rasa Shell: ***
In Terminal1: "rasa run actions"
In Terminal2: "rasa shell"
*** To Invoke Rasa NLU Shell:
In Terminal: "rasa shell nlu"
*** To Train the Model: (trains both nlu and core and saves the model in models folder)
In Terminal: "python3 rasa_train.py"
MODEL FILE is saved in models folder: (models/restaurant_rasa_model.tar.gz)
NOTE: Both nlu and core model are saved inside one model file, i.e models/restaurant_rasa_model.tar.gz
*** To Validate NLU Model Accuracy: (Classification report saved to results/intent_report.json)
* DEFAULT : separate test set is created
* VALIDATION : uses cross - validation
In Terminal: "python3 nlu_test.py --type DEFAULT"
In Terminal: "python3 nlu_test.py --type VALIDATION"