Git Product home page Git Product logo

dl-chatbot's Introduction

DL-Chatbot

A demo deep learning RNN chatbot using Tensorflow with a C# WPF GUI.

Note: Pretrained models are not provided. Please train your own network.

Usage

Socket

To use the python backend, run socket.py and connect to the socket on localhost:8089. Then, send the user input. For example, Hello World!. The socket should return the result as a simple string (no parsing needed).

GUI

First, start the python socket server with the directions above. Then, start the GUI and connect to the socket with the ip localhost and port 8089. Once the socket connects, use the first tab to talk with the chatbot.

Required python libraries:

  • Tensorflow
  • Numpy
  • socket (should be installed with python)
  • re (should be installed with python)

Installation

To install Tensorflow, run

pip install tensorflow

For the gpu version of Tensorflow, run

pip install tenorflow-gpu

To install Numpy, run

pip install numpy

Training

Training a chatbot network will take a roughly a few hours. In order to train, you must provide a word embedding (the scripts by default use glove.twitter.27B.100d.txt) and the Cornell movie dialog corpus txts in the ./Data folder.

To train the network, run Train.py and input the number of epochs to train for. Input save to save the network for the socket server and exit to exit (without saving). Input predict for inference.

Train epochs: 10  # train 10 epochs
Train epochs: predict hey! how are you  # inference with input sequence 'hey! how are you'
Train epochs: save  # saves the network at ./model
Train epochs: 15
Train epochs: save
Train epochs: exit

License

Apache License 2.0

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.