/silly-chatbot

Sequence-to-Sequence chatbot implement using PyTorch

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

silly-chatbot

This repository has stopped maintenance, new project links: pytorch-chatbot

Requirements

  • Python 2.7
  • Pytorch 0.12

Corpus

Usage

Preprocess

python preprocess.py

This script will create file dialogue_corpus.txt in ./data directory.

Training Model

python train.py

The hyperparameters of model define in configuration file config.json.
In my local environment(GTX1060), training model need about four hours.

Testing

python chatbot.py

Test Example

> hi .
bot: hi .
> what's your name ?
bot: jacob .
> how are you ?
bot: fine .
> where are you from ?
bot: up north .
> are you happy today ?
bot: yes .

The chatbot can answer these simple questions, but in most cases it is a silly bot.

Reference