Inspiration

We decided to create this application because of a friend of ours, who has severe allergies. Due to this allergy, this friend would have to check the food label of everything she ate. We wanted to help her and anyone else who has an allergy by finding a way to quickly ensure that a food item has a specific allergen(s), so we decided to create AllerGEN.

What it does

Essentially, this application allows a user to upload an image of a food label and a list of items that the user is allergic to (separated by commas). Then, the app uses a machine learning library on the back-end to extract data from the food label and find out whether or not the allergens the user listed is on the food label. From there, an output is generated on the website based on if the food item has an allergen or not.

How we built it

This app is built on a ReactJS front-end and a Python Flask back-end. Essentially, when the user inputs information about their specific allergy, information is sent to the backend, and the response is loaded to the back-end machine learning algorithm, which outputs a list of items from the uploaded food label. The REST API sends information back to the front-end, and from there the response object is compared to the user’s allergens. If the allergen exists in the response object, then the user is notified that they cannot eat the food. However, if it doesn’t exist, then the user is notified that they can eat the food.

Challenges we ran into

Due to the complexity of the application, we ran into quite a couple of challenges during the process of building this application. Mainly, it was extremely difficult to send the file uploaded to the python machine-learning backend as that would only take the file path, which isn’t accessible in React. By working through the application, we realized that the file upload automatically puts the file into an immutable MultiDict. From there, we translated this dictionary into a normal dictionary through casting, and then we were able to the key-value pair to read the actual file.

Accomplishments that we're proud of

Getting the application to work in general was our biggest accomplishment, but more specifically, a few of our biggest achievements that we’re proud of is connecting the front-end to the back-end with a REST API and finding a machine-learning library that can read information from a food label effectively. The reason why these are considered major accomplishments is that they were challenging to find or set up, but once we did, they allowed the application to be functional.

What we learned

Although we all had basic computer science experience, we had intermediate to beginner knowledge in the technologies we used (i.e. React, Python/Flask, and API handling). By going through the challenges related to the project, we were able to gain a lot of experience in said technologies. Specifically, we learned how to get user input from the front-end and ultimately send that over to the back-end libraries.

What's next for AllerGEN

Although it was nice that we were able to use a machine-learning library to read our food labels, this can be extremely slow. Our next goal for AllerGEN is to eventually create our own neural network to increase the efficiency of the machine learning algorithm. Another next step for the project is to eventually deploy it for public use using Azure.

Share this project:

Updates