Skip to content

SalmaOuardi/Pytorch-Chatbot

Repository files navigation


Front-End Checklist

Chatbot with Pytoch and Tkinter

#### Author: Salma OUARDI

As an AI Engineer intern I was able to leverage my NLP and Deep Learning skills to create an NLP-powered chatbot for the company's website.


Tasks / Achievements

  • Designed and built a Chatbot for the company's website with the help of NLP And Deep Learning.
  • Conducted extensive data preprocessing utilizing the Natural Language Toolkit (NLTK) to format and prepare data for input into the neural network.
  • Constructed a comprehensive knowledge base, incorporating information sourced from company databases for integration into the chatbot's intents file.
  • Implemented a multi-layer feed-forward neural network using PyTorch, trained the model to achieve optimal performance, and created a user-friendly graphical interface for the chatbot using Tkinter.

Installation

Create an environment

Whatever you prefer (e.g. conda or venv)

mkdir myproject
$ cd myproject
$ python3 -m venv venv

Activate it

Mac / Linux:

. venv/bin/activate

Windows:

venv\Scripts\activate

Install PyTorch and dependencies

For Installation of PyTorch see official website.

You also need nltk:

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