top of page

Creating a Food Recommendation System using Streamlit

In this blog post, I share my journey of creating a Food Recommendation System—a project born out of my passion for food and a desire to break free from cooking the same dishes repeatedly. I had an idea to create a tool that recommends recipes I'd like, making cooking more exciting. This project not only helped me find tasty recipes but also taught me about recommendation systems and making web apps.

 

You can check the web app by clicking on the link here. 

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

 

Dataset:

I utilised the 'Food Ingredients and Recipes Dataset with Images,' which includes recipe titles and cleaned ingredient lists as the foundation for my Food Recommendation System.

​

Recipe Recommender Algorithm:

My Food Recommendation System employs a straightforward yet effective algorithm:

  1. Preprocessing User Input: Input ingredients are preprocessed to ensure consistency in format, facilitating matching with the recipe dataset.

  2. Count Vectorisation: The CountVectorizer from scikit-learn is employed within the Streamlit web app to transform ingredient lists into numerical representations, enabling ingredient similarity measurement.

  3. Calculating Ingredient Similarity: Numerical ingredient representations are used to compute cosine similarity, providing a similarity score between user preferences and every recipe in the dataset.

  4. Finding Matching Dishes: The system identifies dishes closely matching the user's input, using a predefined threshold to filter out less similar options.

  5. Presenting Recommendations: On the website, a list of recommended dishes is presented, complete with dish titles and the necessary ingredients

​

The code developed for the project can be viewed here.

​​

Streamlit Share is used to make the web app publicly available. In order to do that, your GitHub account should get connected with Streamlit Share. A useful tutorial to do that can be found here, developed by Mirsa Turp. 

Screenshot 2023-09-09 at 10.38.34.png
bottom of page