/NLP-chatbot

NLP RoboPal: A Natural Language Processing Chatbot. Welcome to NLP RoboPal, where the power of Natural Language Processing (NLP) brings conversations to life! NLP RoboPal is a sophisticated chatbot designed to understand and respond to human language with intelligence, empathy, and accuracy.

Primary LanguagePythonMIT LicenseMIT

Chatbot Deployment with Flask and JavaScript

image

This gives 2 deployment options:

  • Deploy within Flask app with jinja2 template
  • Serve only the Flask prediction API. The used html and javascript files can be included in any Frontend application (with only a slight modification) and can run completely separate from the Flask App then.

Initial Setup:

This repo currently contains the starter files.

Clone repo and create a virtual environment

$ git clone https://github.com/prashiljatakiya/NLP-chatbot.git

Install dependencies

$ (venv) pip install Flask torch torchvision nltk

Install nltk package

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

Modify intents.json with different intents and responses for your Chatbot

Run

$ (venv) python train.py

This will dump data.pth file. And then run the following command to test it in the console.

$ (venv) python chat.py