Inspiration

As a busy university student, brainstorming recipe ideas can sometimes be difficult when cooking isn't typically a top priority. With this project, we hoped to make the process of finding recipes easier.

What it does

Our model embeds user inputs using a sentence-transformers model and calculates cosine similarities with the other recipes in our chosen dataset. The 3 top cosine similarities are returned to the user as recommended recipes.

How we built it

The first model we experimented with was a bert-based-uncased model from Hugging Face that was trained for masked language modeling (MLM) and next sequence prediction (NSP). However, we found a sentence-transformers model that was much easier to implement -- it allowed us to map sentences from our data frame to vectors that we later used to calculate similarities between recipes.

Challenges we ran into

We had difficulty with implementing our initial idea of inputting only ingredients and recommending recipes based on the dataset. The BERT model did not work best for this recommendation system and we had to change the inputs in order to increase the cosine similarity.

Accomplishments that we're proud of

We were able to find relatively high cosine similarities between recipes in our dataset to recommend recipes of high similarity to users.

What's next for Recipe Recommender

In future works, we hope to expand the input bounds to general ingredients rather than just recipes in the dataset. We also hope to include more information on the recipes (recipe steps, nutrition, and ratings) as an output to the user.

Share this project:

Updates