Skip to content

Recommendation Engine Based Web Application that serves recipes to users

Notifications You must be signed in to change notification settings

AnanyaGarg28/Engage-22-Project-Bongrub

Repository files navigation

Engage-22-Project-Bongrub

Wake'up. It's Food O'Clock 🍕.

Must have heard 'Bon Appetit', a French phrase meaning 'enjoy your meal'.

This is 'Bongrub', meaning happy grubs (informal for food) 😋. We all enjoy delicious food being served to us, but how many of us have enjoyed watching recipes. So, this is an attempt to bring to you the best and popular recipes in the world to help you save that hunt for the perfect recipe.

Sound amazing, right? Let's see how this is cooked and served 👨🏻‍🍳.

WORKING


This is a web application that works like a recipe repository for all those foodies out there who are waiting to try out new recipes. It works on a recommendation engine built using machine learning models which would secretly identify the user's taste buds and try to keep the user attached to this application by recommending similar recipes based on the content browsed.

A recommendation engine could be classified based on three major categories:

  • Content Based Approach
  • Collaborative Filtering Approach
  • Hybrid Approach

For this project, I have used the Content Based Filtering approach. With a mix of generalized collaborative approach, the model acts as a hybrid model as it takes into account the opinion of other users to generate a recommendation. Recommendations made by the engine work in different ways according to the various models it has, namely

  • Popularity Based Recommender
  • Category Based Recommender (Takes into account the ratings and popularity too)
  • Content Based Recommender (Based on recipe name, description, keywords, ingredients, quantities, and time it takes to prepare a recipe)

The dataset contains recipes and reviews present on Food.com. The recommendation model took 9000 recipes from the dataset to prepare the engine. The engine prepared was integrated with Flask Application and a server was created to serve the .pkl files generated by the model. The Flask app was then integrated with a NodeJS server which finally renders the data fetched from the server to the application clients for the end user to use.

Run Locally


To run this code in your local machine, follow these steps:

Step 1: Make a folder on your desktop. Open a terminal in this newly created folder to clone this repository on your machine.

git clone https://github.com/AnanyaGarg28/Engage-22-Project-Bongrub.git

Step 2: Go to the project directory and install flask.

cd Engage-22-Project-Bongrub/ pip3 install flask

Step 3: Run the flask server.

python recipeapp.py

Step 4: Wait for 10 seconds before it shows that the flask app is running. Copy the URL on which it is running into your local machine. It may look like:

Running on http://192.168.1.79:5000 (Press Ctrl+C to quit)

Step 5: Open a new terminal in the "Engage-22-Project-Bongrub". Go to the "node app" folder and open the "app.js" file in a code editor of your choice.

cd node\ app/

Step 6: Replace the ip and port in the uriObj with the URL address you saved in step 4 and save the file.

Step 7: Now, in the second terminal, inside the "node app" directory, install the npm packages (Make sure you have the latest version of npm installed).

npm install

Step 8: Now that we have all the dependencies installed. It's time to run the node server.

node app.js

The application is now running on your machine. You can access it by typing localhost:3001 in your browser.

Hope you like the recommendations!! Happy Grubbing ✨!!