A sequence2sequence chatbot implementation with TensorFlow.
For console chat:
- Run
chat_console_best_weights_training.bat
orchat_console_best_weights_validation.bat
For web chat:
-
Run
chat_web_best_weights_training.bat
orchat_web_best_weights_validation.bat
-
Open a browser to the URL indicated by the server console, followed by
/chat_ui.html
. This is typically: http://localhost:8080/chat_ui.html
-
Set console working directory to the seq2seq-chatbot directory. This directory should have the models and datasets directories directly within it.
-
Run chat.py with the model checkpoint path:
run chat.py models\cornell_movie_dialog\trained_model\best_weights_training.ckpt
To train a model from a python console:
- To train a new model, run train.py with the dataset path:
run train.py --datasetdir=datasets\dataset_name
Or to resume training an existing model, run train.py with the model checkpoint path:
run train.py --checkpointfile=models\dataset_name\model_name\checkpoint.ckpt
To start TensorBoard from a terminal:
tensorboard --logdir=model_dir
The following python packages are used in seq2seq-chatbot: (excluding packages that come with Anaconda)
-
pip install --upgrade tensorflow
For GPU support: (See here for full GPU install instructions including CUDA and cuDNN)
pip install --upgrade tensorflow-gpu
-
pip install --upgrade jsonpickle
-
flask 0.12.4 and flask-restful (required to run the web interface)
pip install flask==0.12.4 pip install --upgrade flask-restful