Basit Anwer
commited on
Commit
·
d8de300
1
Parent(s):
a934e45
Fixed docker image and updated readme
Browse files- Dockerfile +11 -7
- README.md +30 -8
- start.sh +2 -1
Dockerfile
CHANGED
|
@@ -1,14 +1,18 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
|
| 8 |
FROM rasa/rasa:2.7.1-spacy-en
|
| 9 |
|
| 10 |
-
WORKDIR /hotel-bot
|
| 11 |
-
COPY
|
|
|
|
|
|
|
| 12 |
|
| 13 |
ENV RASA_REST_PORT=5005
|
| 14 |
|
|
|
|
| 1 |
+
# Rasa-bot with ZIR-AI fallback
|
| 2 |
|
| 3 |
+
# Run:
|
| 4 |
+
#
|
| 5 |
+
# docker container run --publish 5005:5005 --name zir-ai-rasa zir-ai:rasa
|
| 6 |
+
#
|
| 7 |
+
# Build:
|
| 8 |
+
# docker build . -t zir-ai:rasa
|
| 9 |
|
| 10 |
FROM rasa/rasa:2.7.1-spacy-en
|
| 11 |
|
| 12 |
+
WORKDIR /opt/zir/hotel-bot
|
| 13 |
+
COPY . /opt/zir/hotel-bot
|
| 14 |
+
|
| 15 |
+
RUN rasa train
|
| 16 |
|
| 17 |
ENV RASA_REST_PORT=5005
|
| 18 |
|
README.md
CHANGED
|
@@ -16,9 +16,11 @@ mechanism, which gets relevant information from ZIR Semantic Search.
|
|
| 16 |
|
| 17 |
- [Rasa Bot & Zir](#rasa-bot--zir)
|
| 18 |
- [Setup & Play](#setup--play)
|
| 19 |
-
- [
|
| 20 |
-
- [
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
- [Customizing the bot](#customizing-the-bot)
|
| 23 |
- [Data](#data)
|
| 24 |
- [Rasa Custom Action](#rasa-custom-action)
|
|
@@ -53,13 +55,33 @@ The results sum up to be this:
|
|
| 53 |
|
| 54 |
## Setup & Play
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
> [virtual environment](https://docs.python.org/3/library/venv.html) to isolate
|
| 60 |
> the dependencies rasa requires.
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
Follow the
|
| 65 |
[rasa installation instructions](https://rasa.com/docs/rasa/installation) or
|
|
@@ -85,7 +107,7 @@ Python Path : /bin/python3
|
|
| 85 |
|
| 86 |
> Windows & WSL (Windows Subsystem for Linux) works too
|
| 87 |
|
| 88 |
-
|
| 89 |
|
| 90 |
You should be in the cloned repository folder before running following commands.
|
| 91 |
The bot uses spacy in its pipeline & requires you to have it installed. Run the
|
|
@@ -103,7 +125,7 @@ Now you'll need to train the rasa bot
|
|
| 103 |
rasa train
|
| 104 |
```
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
While running the model, you are required to run the rasa action server along
|
| 109 |
with the rasa bot. So in one terminal run
|
|
|
|
| 16 |
|
| 17 |
- [Rasa Bot & Zir](#rasa-bot--zir)
|
| 18 |
- [Setup & Play](#setup--play)
|
| 19 |
+
- [Docker](#docker)
|
| 20 |
+
- [Manual](#manual)
|
| 21 |
+
- [Set-up Rasa](#set-up-rasa)
|
| 22 |
+
- [Set-up repo](#set-up-repo)
|
| 23 |
+
- [Running the demo](#running-the-demo)
|
| 24 |
- [Customizing the bot](#customizing-the-bot)
|
| 25 |
- [Data](#data)
|
| 26 |
- [Rasa Custom Action](#rasa-custom-action)
|
|
|
|
| 55 |
|
| 56 |
## Setup & Play
|
| 57 |
|
| 58 |
+
After Cloning this repository, you have two ways of setting up the rasa bot.
|
| 59 |
|
| 60 |
+
1. Use [Docker](#docker) to setup the bot or
|
| 61 |
+
2. [Manually](#manual) install rasa on your machine
|
| 62 |
+
|
| 63 |
+
### Docker
|
| 64 |
+
|
| 65 |
+
Open your shell and from within the repository folder run the following commands
|
| 66 |
+
to build and run the docker image
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
docker build . -t <YOURNAME>/rasa-bot
|
| 70 |
+
docker run -p 5005:5005 <YOURNAME>/rasa-bot
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
Afterwards, load the [index.html](./www/index.html) in the www folder in your
|
| 74 |
+
browser to talk to the bot
|
| 75 |
+
|
| 76 |
+
### Manual
|
| 77 |
+
|
| 78 |
+
If you want to setup the bot manually then please follow the steps below.
|
| 79 |
+
|
| 80 |
+
> If you're installing rasa on your machine, you might want to create a
|
| 81 |
> [virtual environment](https://docs.python.org/3/library/venv.html) to isolate
|
| 82 |
> the dependencies rasa requires.
|
| 83 |
|
| 84 |
+
#### Set-up Rasa
|
| 85 |
|
| 86 |
Follow the
|
| 87 |
[rasa installation instructions](https://rasa.com/docs/rasa/installation) or
|
|
|
|
| 107 |
|
| 108 |
> Windows & WSL (Windows Subsystem for Linux) works too
|
| 109 |
|
| 110 |
+
#### Set-up repo
|
| 111 |
|
| 112 |
You should be in the cloned repository folder before running following commands.
|
| 113 |
The bot uses spacy in its pipeline & requires you to have it installed. Run the
|
|
|
|
| 125 |
rasa train
|
| 126 |
```
|
| 127 |
|
| 128 |
+
#### Running the demo
|
| 129 |
|
| 130 |
While running the model, you are required to run the rasa action server along
|
| 131 |
with the rasa bot. So in one terminal run
|
start.sh
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
-
rasa run actions &
|
|
|
|
|
|
| 1 |
+
rasa run actions 2>&1 &
|
| 2 |
+
rasa run --credentials ./credentials.yml --enable-api --auth-token XYZ123 --model ./models --endpoints ./endpoints.yml --cors "*" 2>&1
|