Seq2Seq-Chatbot
Seq2Seq Chatbot Using Tensorflow.
Dependencies
- Tensorflow
- Numpy
- Six
Usage
To preapre the enc and dec file for your own data use the pre_processing.py inside the data dir.
- Start training the model by changing the
mode = 'train'
in bot.py. - Model will be saved in the checkpoint dir every few steps based on the value assigned to
steps_per_checkpoint
. - After training is finished set
mode = 'test'
and execute the script.
Triggers
If you are training a closed domain chatbot then you can use the trigger.py to make the chatbot perform an action based on the decoded output.
- Place the triggers in the dec file and make sure the trigger symbol is in vocab20000.dec.
- Update the trigger.json.
- Update the conditional statement and the action to perform in trigger.py.
- Train and run your model.
Other Files
- telegram.py - Just assign the API key to the
bot
var to interact with your bot on telegram. - debug.py - Prints everything.