GithubHelp home page GithubHelp logo

udayallu / seq2seq-chatbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karma9874/seq2seq-chatbot

0.0 1.0 0.0 39.45 MB

Chatbot based Seq2Seq model with bidirectional rnn and attention mechanism with tensorflow, trained on Cornell Movie-Dialogs Corpus and deployed on a Flask Server

Python 5.99% CSS 1.01% JavaScript 0.42% HTML 0.38% Jupyter Notebook 92.20%

seq2seq-chatbot's Introduction

Seq2Seq-Chatbot

Introduction

This Chatbot is a TensorFlow implementation of Seq2Seq Mode. It make use of a seq2seq model RNN for sentence predictions. The chatbot is trained on Cornell Movie Dialogs Corpus on Conversation of lenghth between 5 to 2 words

Installation

To run this chabtot you will need:

  • Python 3.5
  • Tensorflow (1.13.1)
  • Numpy
  • Flask
  • Matplotlib
  • Dataset

Running

To chat with the trained model from Web Chat:

  1. First install the required depedencies from Chat_UI_Web and run pip install -r requirment.txt
  2. From the Chat_UI_Web directory run run.py python run.py
  3. Open a browser to the URL indicated by the server console, This is typically: http://localhost:5000/

To chat with the trained model from Python Console:

  1. First install the required depedencies from root directory and run pip install -r requirment.txt
  2. From the root directory run python chat.py

List of Hyperparameters

  • Batch_size to 128
  • Rnn_size to 128
  • Embed_size to 128
  • Learning_rate to 0.0.1
  • Epochs to 500
  • Keep_prob to 0.75

For Training Model

To Train Model from Python Console:

  1. Configure the config.py file for desired training hyperparameters
  2. Run train.py python train.py
  3. Make sure the datasets should be present in the datasets folder

Results

Model was able to train to Accuracy of 62% and Loss of 19% and after that it was overfitting

Accuracy

alt text

Loss

alt text

Chat Results

Human: who are you
Bot: girlfriend
Human: who am i
Bot: doctor livingston
Human: where are you from
Bot: southern california
Human: how old are you
Bot: nineteen or
Human: are you a boy
Bot: i am trying
Human: are you a girl
Bot: something like that
Human: do you drink
Bot: no thanks

Some Funny Result alt text

seq2seq-chatbot's People

Contributors

karma9874 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.