Inspiration

Food waste is a major environmental issue that often falls under the radar. Many may not know, but 40% of food produced and processed in the U.S. ends up in landfills. Unfortunately, not enough attention is being brought to the issue. To bring more awareness to this issue and to help combat it (to some extent) we developed fruitcalendar.com.

What it does

Fruit Calendar works by having the user upload an image of a fruit; the website will then tell the user if the fruit is ripe or not. In the case that it is, the website will recommend related recipes to the user. These features give the user ways to use the fruit before it goes bad!

How we built it

The project was built using Streamlit to create the user interface. This includes the file upload form, the ripeness prediction display, and the recipe recommendations. Streamlit also allowed us to add interactivity to the app, such as allowing users to upload new images and see updated ripeness predictions.

In the back end, a Convolutional Neural Network model was developed using TensorFlow. We trained the CNN model on a dataset of labeled fruit images, and then used it to predict the ripeness of new images uploaded by users. We also used the Edamam Recipe Search API to retrieve data about the fruit and then extract the top 10 recipes (name of recipe, ingredient list and URL) pertaining to the fruit. Then, we provided the URL of the recipe if the user should choose to proceed.

Challenges we ran into

Throughout the journey of this project, we went through a lot of challenges. This hackathon was all of our first time coding a project at a hackathon and we couldn’t have been more proud with what we accomplished. At the beginning, we struggled with becoming more familiar with Streamlit as we wanted to challenge ourselves with a new technology. We had a bit of trouble getting the ML model to work the way we wanted it to, but through more training, we got it to perform the way we wanted. For displaying the recipes, we had designed a very nice sidebar feature that allowed you to skip down to the section of the page for the recipe of interest. However, when integrating the API code sections with the ML sections, we had a hard time making the features appear on a different page when a button was clicked and had to scrap the sidebar feature. In addition, it turns out that Streamlit does not have a button multi page navigation feature native in its library that would allow navigation to a new page upon a click of a button and so we spent a lot of time trying to figure out work-arounds to this. In all, we are so proud that our project is the way it is and have enjoyed fighting through these challenges as learning experiences.

Accomplishments that we're proud of

Despite all of the challenges we encountered, we were ultimately able to overcome them. Even more importantly, we were able to create a product that has the potential to make an impact on a pressing world issue.

What we learned

We further developed our technical skills through implementing machine learning and Streamlit. We also trained our ability to utilize different technologies to aid our development process.

What's next for Fruit Calendar

In the future, the project aims to expand the model training to incorporate additional fruit types and providing personalized recipe recommendations based on user preferences and dietary restrictions. Furthermore, a feature, perhaps made by MongoDB, that saves a favorited recipe for the user would also be viable.

Built With

Share this project:

Updates