Skip to content

It is a pytorch and deep learning based ai chat bot.

Notifications You must be signed in to change notification settings

codestryker/ai_chat_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of a Coffee&Tea Shop Chatbot in PyTorch.

Chatbot implementation with PyTorch.

  • The implementation is done with a Feed Forward Neural net with 2 hidden layers.

Installation

Create an environment

mkdir myproject
$ cd myproject
$ python3 -m venv venv

Install PyTorch and dependencies

pip install nltk

If you get an error during the first run, you also need to install nltk.tokenize.punkt: Run this once in your terminal:

$ python
>>> import nltk
>>> nltk.download('punkt')

Usage

Run

python train.py

This will dump data.pth file. And then run

python chat.py

Customize

Have a look at intents.json. Just define a new tag, possible patterns, and possible responses for the chat bot.

{
  "intents": [
    {
      "tag": "greeting",
      "patterns": [
        "Hi",
        "Hey",
        "How are you",
        "Is anyone there?",
        "Hello",
        "Good day"
      ],
      "responses": [
        "Hey :-)",
        "Hello, thanks for visiting",
        "Hi there, what can I do for you?",
        "Hi there, how can I help?"
      ]
    },
    ...
  ]
}

About

It is a pytorch and deep learning based ai chat bot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages