Deep Learning-based chatbot using Tensorflow
Last updated Jun 3, 2024
41
Stars
24
Forks
2
Issues
0
Stars/day
Attention Score
30
Language breakdown
No language data available.
▸ Files
click to expand
README
seq2seq-chatbot
A sequence2sequence chatbot implementation with TensorFlow.Chatting with a trained model
For console chat:
- Run
chatconsolebestweightstraining.batorchatconsolebestweightsvalidation.bat
- Run
chatwebbestweightstraining.batorchatwebbestweightsvalidation.bat
- Open a browser to the URL indicated by the server console, followed by
/chatui.html. This is typically: http://localhost:8080/chatui.html
To chat with a trained model from a python console:
- 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\cornellmoviedialog\trainedmodel\bestweights_training.ckpt
Training a model
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\datasetname\modelname\checkpoint.ckpt Visualizing a model in TensorBoard
To start TensorBoard from a terminal:
tensorboard --logdir=model_dir Dependencies
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🔗 More in this category