This repository contains the code example for a Chatbot from the course CS 20SI: TensorFlow for Deep Learning Research at Stanford University
It is a complete but primitive neural chatbot using sequence to sequence model with attentional decoder in TensorFlow. Originally it was created by Chip Huyen as the starter code for an assignment «TensorFlow for Deep Learning Research» cs20si.stanford.edu
Original Github code repo: https://goo.gl/QH6M6E
A companion assignment instructions sheet: web.stanford.edu - https://goo.gl/vfGQI4
Claude Coulombe, TÉLUQ / UQAM Montréal, updated the code in order to be compatible with Python 3 and TensorFlow 1.1. On May 31 2017, it seems to work correctly but I have not the computing ressources to train it for a long period of time.
Detailed syllabus and lecture notes can be found at http://cs20si.stanford.edu
Instructions:
-------------
-
Check out this repository.
git clone https://github.com/ClaudeCoulombe/tf-stanford-tutorials.git -
Download and unzip the dataset and put it in the data sub-folder
https://www.cs.cornell.edu/~cristian/Cornell_Movie-Dialogs_Corpus.html -
Change the DATA_PATH in the config.py, line 20
-
Then run the data.py file
python data.py
It should create the folder 'processed', and then put a bunch of data files into it. -
Train the model
python chatbot.py --mode train
You could interrupt it after a long time or when the loss is low enough
since the TensorFlow model is saved in the checkpoints folder you can recover the models -
Interact / play with the Chatbot
python chatbot.py --mode chat