Code Monkey home page Code Monkey logo

ai-chatbot's Introduction

AI-Chatbot

A demo deep learning 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 with input: at the beginning. For example, input: Hello World!. The socket should return just the result (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

It is recommended to use the pre-trained network provided in the backend folder. Training a new network from scratch will require a lot of memory and computing power. Around 5GB VRAM and 2-3GB RAM (The network is optimized for Tensorflow-GPU and runs on both GPU and CPU. To change this, modify network.py)

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). For example, the following inputs will save the network after 50 epochs and another 100 epochs

Train epochs: 50
Train epochs: save
Train epochs: 100
Train epochs: save
Train epochs: exit

License

Apache License 2.0

ai-chatbot's People

Contributors

everwinds avatar

Watchers

James Cloos avatar jansion.wang 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.