Inspiration
We as college students have witnessed way too often how food is wasted because it crosses its expiration date. Caught up in the hustle and bustle of life, we forget to keep track of the food items we get in the groceries until it's too late and we have no choice but to throw the food away. The wasted food makes its way into landfills where it contributes significantly to greenhouse gases and further impact the climate change. This application is our way of affecting a positive global change in line with Google's mission to preserve the environment.
What it does
Green Grocers application takes dictation of grocery items a user brings home and stores them along with product attributes such as name, quantity, and expiration date. If the user does not mention any of the necessary attributes such as the expiration date, the algorithm prompts user to state the missing attribute. At the end of each day or a user-specified time, the application iterates through the food/drink items, sorting the list in the order of approaching expiration dates and notifying you if an item needs to be consumed within 3 days leading up to its expiration. These functionalities help each user keep track of his/her pantry inventories and ensure no food is wasted because it goes past its expiration date.
How we built it
We started by brainstorming the most intuitive ways users would enjoy using an application that would guide them in mitigating food wastage without becoming overbearing after a while. We decided on developing a web application that would take speech input that includes name, quantity and expiration date from the user on the groceries he/she brings home and save these grocery items in a backend database. At a user-specified time, the application will execute a check of the products in the database, sort them based on expiration dates and update users of any items nearing the expiration dates.
As such, we compartmentalized the project into backend development and frontend design where backend development consisted of using a SpaCy open source library for information extraction, a predefined text model (BERT), and an online food database to custom-train named entities and used a generic text database to train the model for other entities so that it can capture the other attributes of a grocery item.Frontend design consists of React to create an interactive and intuitive UI. To obtain speech input from the user, we used React-Speech-Recognition hook built on top of the Web Speech API which is an experimental browser standard for voice input. For a user to set up a specific time to run the daily check of items with regards to expiration dates, we utilize cron job in the frontend.
Challenges we ran into
With such a general challenge statement, it took a few hours to properly brainstorm a potential application and visualize potential end cases in the theoretical concept before we could move onto the practical implementation. It also took us a while to not only search for viable databases for a custom model but also to actually custom-train a model with new entities in a small span of time.
Accomplishments that we're proud of
We are proud of making an application that emphasizes the ease of mitigating food wastage from a user's perspective without requiring an unnecessarily high amount of interaction for the application to operate effectively. Our technical goal was to make this application autonomous in its operations such as notifying users of soon-to-expire products without requiring more input than the one where user tells our application of the product's existence.
What we learned
After brainstorming and nailing down the domain of our application, we learned how to better highlight the scope of our project and stick to it without veering off-course outside our set domain. We also learned how to utilize various NLP and Speech-to-Text packages.
What's next for Green Grocers
We aim to expand Green Grocers beyond its initial capabilities.
Integrating with Google Nest to interconnect with other Google services.
Recommending tailored recipes specifically involving soon-to-expire consumables to incentivize users in preventing wastage.
Integrating Green Grocers with health-conscious application to help guide the user towards healthy eating habits by studying and analyzing consumers’ purchasing habits via machine learning and data analytics.
Log in or sign up for Devpost to join the conversation.