This repo contains the code for training and Deployment of a Seq2Seq Attention based chatbot trained on Cornell Movie Dialogues.
The Model comprises of 3 Encoder and 3 Decoder Layers connected by Bahdanau Attention. The Cornell Movie Dialogue corpus was fed into the model after preprocessing for rare words and unicode characters. The detailed preprocessing of the text and the training of the model code can be found in the Notebook attached.
I used pretrained Glove Embeddings for generating embeddings from the text before feeding it to model.
To run the model on local machine
-
Open up a virtual environment (what is that?) and download all the packages in
requirements.txt
\ There might be some problems in installing tensorflow so, please install it manually using thispip install --upgrade pip
pip install --upgrade tensorflow
If there is still a problem, refer this
-
Next, get the
model_data
folder here and put it in the same directory asapp.py
-
Now From the root directory i.e. The directory containing
app.py
runpython app.py
.
This should start a local host server in your machine and you can open it up in the browser of your choice.
The deployed Chatbot can be found at chat_link Please give it some time to load, if it takes some time.
If you have any ideas about speeding up loading time or any suggestions regarding code, I will be grateful to hear you.