Giter Site home page Giter Site logo

chatbot's Introduction

Chatbot Project

Introduction:

In the Project, we are about to use efficient Transformer(Reformer) to generate a dialogue between two bots using Trax.

The dataset that we have used is called MultiWoz dataset. The dataset that we have used has more than 10,000 human annotated dialogues and spans multiple domains and topics. Some dialogues include multiple domains and others include single domains.

Project Description

Root directory of this project contains:

  • 2 sub-folders
  • several [.py] files
  • 1 text files containing all the requirements of this project
  • 1 readme.md file containing all the necessary instructions.
  • Some test image examples

Details about the folders and files:

  • data(folder): Contains all the vocabulary and dataset files that will be used in this project.
  • model(folder): Contains out train, and validation checkpoints, model configuration file and our trained model will be saved here.
  • config.py: Configuration file for our project data paths and variables.
  • utils.py : Contains different helper functions.
  • process.py : python script to process and generate our train and validation data streams.
  • model.py : Contains python scripts to define our model and model helper functions.
  • train.py: Training script to train the model.
  • inference.py: Here we can test our model by giving a starting sentence and maximum len of our conversation which will generate the conversation by applying the model.

Instructions:

Before starting we need to satisfy all the dependencies. For that reason need to execute the following command. (All the commands need to be executed from the root folder)

  • Install the dependencies:
    pip install -r requirements.txt

Before start the training we need to process our dataset into the correct format. and then we will start our training.

  • To process and start training the dataset:
    python train.py
  • To evaluate the trained model:
  • Our inference script takes two argument parser parameters to infer from the trained model.
  • parameter 1(--s_sen): Our staring sentence starts with a space followed by (person 1:) delimeter and end with (person 2:) delimeter.
  • parameter 2(--max_len): Maximum length of our generated conversation.
  • Running inference script:
    !python inference.py --s_sen ' Person 1: starting/line/of/the/convo Person 2: ' --max_len 200

Inference

Some generated conversation with the trained model:

Conversation 1

Conversation 2

Conversation 3

chatbot's People

Contributors

apucs avatar

Watchers

 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.