Tensorflow Chatbot

This project is capable of interacting with user in four different 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.

Installing

Program requires following dependencies

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!

Getting Started

You can interact with chat bot any of these four method

Web interface

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

web

Rest api

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"}

api

GUI

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

ui

CLI

You can interact with bot through command line interface. So find cli.py file from /CLI directory and then execute.

cli

Built With