Inspiration
Staying away from home, as students, we often face difficulties in cooking as we're always running low on groceries and don't have enough time to cook. We often end up ordering more groceries than we need and get confused on what can be cooked using the least effort. Due to this, we often end up spending a lot of money on eating out as that's the next convenient option. Thus, we decided to build something that every person living away from home can use to find dishes they can make based on the ingredients available at home.
What it does
We create a mobile app which takes in the ingredients that you wish to use while cooking and suggests you some recipes which can be made by using those ingredients entirely or the next best thing - recipes for which you won't require a lot of extra ingredients. We use embedding models trained using TF-IDF technique for this purpose. The mobile app recommends the top 5 recipes that you can build in the most convenient manner.
How we built it
Our major challenge was getting a sizeable and usable dataset which contained the recipes and a list of ingredients. However, a straightforward list of ingredients wasn't available and the ingredient list was unstructured. We developed special parsers to extract ingredient names from the unstructured data and used those to train the TF-IDF classifier. Later on we integrated our recommendation API using a Django backend and MongoDB database to the Android based mobile app. The complete app including its UI design was done by us.
Challenges we ran into
It was difficult to extract ingredients as most of the times they would be combined in different form names (granulated sugar, sugar powder, etc.). Having around 6700 unique ingredients, it was difficult to manually separate these names. However, we did find a pattern in the data and improved the performance of the parser by a lot. We also developed the model input in such a way that it takes into consideration the brand names (for example, Aunty's Hot Sauce) as some of them might be more preferable for certain dishes.
Accomplishments that we're proud of
For this purpose, we did find a majority of market apps using heuristic solutions to detect graph based searching to see which subset of ingredients best match with the recipe. Thus, most of these websites treat the problem as a longest common subsequence problem. However, we used the NLP approach which seemed to improve the results when brand names or specific product descriptions were included. Identifying brands which go well with certain dishes also helps improve the taste of the recipe being prepared. We were also able to build a good amount of UI in a very short time as we had a very short team as well.
What we learned
We learned the importance of data scraping and data cleaning throughout the process. It was really necessary for some recommendations to have certain words included and a simple matching or parsing based on just NER based food name extraction won't work. That's why we decided to use an embedding based approach.
What's next for Cookflix
The app can be loaded with a lot more features such as integration with a grocery shopping app like Instacart to also take into account the cost of the groceries to be bought to complete a recipe. This might change the results significantly for some dishes as well. We can also expand Cookflix to have additional filters such as dietary preferences, calorie counts, and then recommend dishes based on those factors as well.
Log in or sign up for Devpost to join the conversation.