Giter Site home page Giter Site logo

aindriyabarua / restaurant-chatbot Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 15.0 19.39 MB

Tutorial to make a simple NLP chatbot with Intent classification, FastText, Flask, AJAX

License: Apache License 2.0

Python 67.32% HTML 18.18% CSS 10.14% JavaScript 4.26% Procfile 0.10%
nlp fasttext natural-language-processing natural-language-understanding flask ajax javascript mongodb natural-language-generation html css json tsne-visualization

restaurant-chatbot's Introduction

Restaurant-chatbot

Architecture overview: step1_chatbot drawio

restrobot_arch2 drawio

Detailed explanation of the project is given in my tech blog here: https://medium.com/@barua.aindriya/building-a-nlp-chatbot-for-a-restaurant-with-flask-b978337049f2

How to set up and run the project?

  1. Install Pre-requisites My python version is 3.6.13. To install all the required libraries, download/clone my GitHub repo and in the folder, open CMD and enter:

pip install -r requirements.txt

  1. Download pre-trained FastText English model Download cc.en.300.bin.gz from https://fasttext.cc/docs/en/crawl-vectors.html . Unizip it to Download cc.en.300.bin, the code for which is helper scripts in my Github repo.
  2. Prepare dataset Run data_embedder.py This will take the dataset.json file and convert all the sentences to FastText Vectors.

python data_embedder.py

  1. Set up Mongo Db on localhost Install MongoDb Compass Make 3 collections: menu, bookings, feedback Menu has to be hardcoded, it includes item, cost, vegan, veg, about, offer.

feedback docs will be inserted when a user gives a feedback so that the restaurant authority can read them and take necessary action.

booking collection writer the unique booking ID and time-stamp of booking, so that when the customer comes and shows the ID at the reception, the booking can be verified.

  1. Run Flask This will launch the web app on localhost

export FLASK_APP=app
export FLASK_ENV=development
flask run

restaurant-chatbot's People

Contributors

aindriyabarua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

restaurant-chatbot's Issues

There is a small bug

On line 182 in response_generator.py, the elif statement causes one functionality to fail. changing the condition to tag == "negative_feedback" would help fix that bug. This is because of the way it is defined in the dataset.json file, where the intent is named negative_feedback.

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.