Skip to content

mvo-projects/chatbot

Repository files navigation

chatbot

This is a PyTorch seq2seq chatbot based on the official PyTorch tutorial using OpenSubtitles corpus.

Clone the project

$ git clone https://github.com/mvo-projects/chatbot.git

Setup an appropriate environment

Download and install Anaconda or Miniconda

Linux

32-bit :

$ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86.sh
$ sh Miniconda3-latest-Linux-x86.sh

64-bit:

$ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ sh Miniconda3-latest-Linux-x86_64.sh

Create an appropriate environment using the spec-file

$ conda create --name chatbot --file chatbot/spec-file.txt

Mac OS

64-bit :

$ curl -0 https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
$ sh Miniconda3-latest-MacOSX-x86_64.sh

Create an appropriate environment using the spec-file

$ conda create --name chatbot --file chatbot/spec-file-osx.txt

Download the corpus / models from this drive

Here

Setup the config.ini file

An operating manual will be included soon. But basically the main idea is that you can configure whatever you want from this file like starting a new training (how many layers, the length), resuming an old one, evaluating your models, change corpus...

This is an example of some parameters and their possible values :

parameters values comments
mode train / eval You can either train your model or evaluate it
use_cuda yes / no Do you want to use your gpu ?
corpuspaths path(s)_to_corpus One or multiples directories separate by a comma
load_encoderpath path_to_encoder_model Relative or absolute path to the encoder_model if you want to eval or resume training
load_decoderpath path_to_decoder_model Relative or absolute path to the decoder_model if you want to eval or resume training

Activate the environment

$ source activate chatbot

Launch the main program using the appropriate config_file for your model

$ python main.py [config_file.ini]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages