Ever eaten out and wanted to know what was in a dish? Introducing, Dr. Al, your food safety pal! Search up a dish and enter your allergen and Dr. Al can tell you the percentage of different recipes containing that allergen, helping you decide whether it's safe to eat.
According to The Medical Futurist, 15 million Americans have food allergies, including a rapidly growing 5.9 million children under the age of 18. Even though all of us know someone affected by allergies, it was still surprising to learn this statistic, so when one of our team members who has many allergies himself came up with the idea initially, we immediately jumped on board. We were inspired to start this project because we had the potential to make something that could help ensure the health and safety of our friends, family, and possibly millions of people wanting to explore new dishes at restaurants.
Our project is a website where the user can type in a dish and a food they are allergic to and then the site returns to the user the percentage of recipes that have that allergen, allowing the user to judge how risky it would be to eat that dish.
We used python and a modified library from Github to grab recipes from allrecipes.com using HTML tags and pulled the ingredients from these recipes. Then, we ran through these ingredients and matched them up with the allergen of choice, then calculated what percentage of recipes had the allergen. For the UI, we built it out on Invision first and then used the CSS to begin building out the front-end.
We were unfamiliar with how Python handles web requests, so pulling these proved more difficult than we anticipated. Trying to use an external library that was not well suited to our conditions, we had to rewrite much of said library until it could perform to our needs. The code was also running unusually slow, and handling much of the edge cases, such as which recipes to actually consider and what to do when the number of recipes were smaller than the number we expected was also tedious. Finally, we found error handling and compatibility to be the hardest parts of the backend work.
Our project works! We didn't think that we were going to finish, but our team pulled through and we created something that has potential to do more in the future! Additionally, most of us know only one or two languages, and we are proud that we were able to integrate languages we know with languages/tools we weren't familiar with to ultimately create a working product.
In the future, our goal is to add a mobile version of the website that prints by default the percentages for the 8 most common allergens, as well as a custom allergen search option. In addition, we want to make the backend more flexible with respect to user mistakes. An additional feature we would like to implement is allowing the user to take a picture of a dish instead of typing it in. Looking at the design, we would also like to add some visuals, a logo, and make it more interactive with the user.