Skip to content

Tensorflow chatbot which is capable of interacting with user through Rest Api, Web interface, GUI and CLI.

Notifications You must be signed in to change notification settings

nimeshabuddhika/Tensorflow-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tensorflow Chatbot

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.

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

Author

  • Nimesha Buddhika - Linkedin - University of Moratuwa, Faculty of IT

About

Tensorflow chatbot which is capable of interacting with user through Rest Api, Web interface, GUI and CLI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published