8000 GitHub - afiqmuzaffar/AhoyBot: A Chatbot using Seq2Seq (Variational Auto Encoder) model
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A Chatbot using Seq2Seq (Variational Auto Encoder) model

Notifications You must be signed in to change notification settings

afiqmuzaffar/AhoyBot

 
 

Repository files navigation

AhoyBot : A Chatbot that speaks Pirate

AhoyBot is a chatbot written in Python, using the computational power of Se2Seq models (here's a helpful guide). AhoyBot was trained on the Cornell Movie Dialog dataset, after translating the entire movie corpus using a Pirate language conversion dictionary.

The goal behind this project was to find out if Seq2Seq models can learn to speak in a particular fashion, i.e. have some sort of "personality" in the way it responds. Another important aspect of this project is to be able to maintain conversational context beyond more than just the present question asked.

The Seq2Seq model used in this project uses an encoder-decoder pair, each consiting of 2 LSTM-RNN layers, along with Luong Attention Mechanism to preserve context of a conversation. The model was implemented using PyTorch library in Python. After training the model for 300,000 iterations we observed that the Chatbot gained considerable "Personality", but it still struggled in forming grammatically correct sentences. The latter was an expected result, since Seq2Seq models, being of Generative nature, take a long time to "learn" the grammar of a language.

GitHub Logo

Running AhoyBot on your own machine

We wanted to host AhoyBot on a public url, but the bulky nature of a Pytorch installation on a webserver and also the big size of the models prevented us from doing so on the limited-size webhosts available free of cost. But it's easy to get AhoyBot running on your local system. Here are the instructions:

  1. Clone this git repo
  2. Make sure Python 3.x is installed on your system, along with Python libraries PyTorch, Flask and Re.
  3. run python flask_app.py
  4. If you get any "module not found" error, please install those Python libraries, else, the app should be up and running on localhost, on port 5001
  5. Open a browser of your choice, and hit the following url: localhost:5001
  6. Now you should be able to converse with AhoyBot.

About

A Chatbot using Seq2Seq (Variational Auto Encoder) model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0