AI ChatBot that uses Python Tensorflow and Natural Language Processing (NLP) using TFLearn as a learning engine. This is capable of interacting multiple ways. Each of these module are functioning independently.
- Web interface
- Reset Api
- GUI
- CLI
And also you can train your own data model which suit to your business model. The data model format is not complex.
Program requires following dependencies
- Python >= 3
- Tensorflow Click here
After successfully installation of above dependencies, you need to follow these steps in order to train the bot.
- You can find data model from /Bot/content.json and change the content as you wish.
- Execute train.py file which is inside /Bot/ directory to train the model that you have prepared.
- Then, You are done!
You can interact with chat bot any of these four method
Django framework is used to implement this web app. You can install Django by fallowing these steps from here
After installation of Django framework, you need to follow these steps
- Find settings.py file inside /Tensorflow_Chatbot/ directory.
- Replace 96 line according to the path of the static folder of your project under *STATICFILES_DIRS * variable.
- Then execute following command inside the root directory.
python manage.py runserver
This app allows you to interact with bot using a rest api. You can find the controller file from /Tensorflow_Chatbot/Api/controller.py location. To execute this Rest api you also need to install Django framework
- Request URL : http://127.0.0.1:8000/api
- Request Type : 'POST'
- Pay load :
{"msg" : "What is your name"}
- Response :
{"ques" : "What is your name", "res":"I'm Slack", "time" :"2018-01 10:07:32"}
You can find UI directory from root directory and then execute ChatView.py file. Before executing this you need to install pygubu. Pygubu is a RAD tool which helps to develop python tknter base user interfaces.
- Download pygubu from here.
- And then extract .tar.gz file and execute following command.
python setup.py install
- Then execute ChatView.py file inside /UI directory.
You can interact with bot through command line interface. So find cli.py file from /CLI directory and then execute.
- Tensorflow - Build neural network
- Django - Web application
- Tkinter - GUI
- Pygubu - To Design GUI
- Nimesha Buddhika - Linkedin - University of Moratuwa, Faculty of IT