Inspiration

One of our friends was recently diagnosed with irritable bowel syndrome and has to be very wary of his diet as a result. One wrong food item could cause irritation for the rest of the day (including very frequent bathroom visits). We realized that people with IBS, allergies, or other health conditions often face similar challenges—sifting through complex ingredient lists, searching for recipes, or ensuring their food aligns with their specific requirements. This application intends to provide a quick and effective method for users to be made aware of all dietary concerns resulting from a food item in relation to their personal health conditions at the click of a button.

What it does

NutriSafe is a smart, user-friendly application that helps users make informed food choices based on their dietary needs and health conditions. Here's what NutriSafe offers:

  1. Ingredient and Allergen Analysis: Users can enter the barcode number or upload an image of the barcode to instantly access a detailed breakdown of ingredients, allergens, and potential dietary concerns.
  2. Nutritional Insights: NutriSafe provides a brief visual representation of the ingredients based on the barcode given.
  3. Recipe Suggestions: Using AI and food databases, NutriSafe suggests healthy recipes featuring a product of your choice, helping users discover new ways to enjoy their food.
  4. Health Classification with AI: NutriSafe uses Cohere's AI models to analyze recipes and classify them as "healthy" or "unhealthy," based on their particular disease/aliment and allergies, giving users additional confidence in their choices.
  5. AI Health Chatbot: NutriSafe uses a Cohere AI-powered chatbot to answer questions about health, diet, and nutrition.

NutriSafe transforms food choices into an easy, informed process, empowering users to eat smarter and live better.

How we built it

NutriSafe combines multiple technologies to deliver an intuitive experience:

  • Frontend: Built using Streamlit for a seamless and visually appealing interface.
  • Backend: Python-powered integrations with APIs such as Open Food Facts for product details and Spoonacular for recipe recommendations.
  • AI Integration: Cohere’s NLP models analyze barcodes of food products and classify them as healthy or unhealthy, based on user-specific information.
  • APIs: Spoonacular for recipes and Open Food Facts for product data, ensuring up-to-date and reliable information.

Challenges we ran into

  1. AI Classification Accuracy: Using specific prompts to correctly classify foods as healthy or unhealthy based on user information was a complex task. It required us to understand how to effectively prompt the Cohere model while reducing the number of tokens required.
  2. Integration Complexity: Integrating multiple APIs (Open Food Facts, Spoonacular) and AI tools (Cohere) was a significant technical challenge. Ensuring smooth communication between these systems while keeping the app responsive was time-consuming and required ongoing optimization.
  3. Limitations with Streamlit Documentation: As this is a relatively new framework, there is not much information on using database hosting platforms and incorporating authentication methods, nor are there many creative elements to use for the front-end. Much of the information we came across was unreliable, generally of low quality (e.g. threads, comments, YouTube videos), and did not work when testing.

Accomplishments that we're proud of

  1. Seamless Integration of APIs: Despite initial challenges, we successfully integrated multiple external APIs to pull in food data, recipes, and nutritional details, providing a smooth user experience.
  2. AI-Powered Health Classification: We were able to use AI to classify food items as healthy or unhealthy, ensuring users received personalized and meaningful recommendations based on their specific health conditions and allergies.
  3. User-Friendly Interface: We were able to design a simple yet informative interface that makes complex data accessible and understandable for users of all backgrounds.

What we learned

  1. The Role of AI in Health and Nutrition: We gained insights into how AI can play a significant role in health applications. AI is relatively efficient in classifying food products when given a proper prompt about specific dietary and health conditions, helping us realize the potential and limitations of AI in nutrition-related fields. 2.The ability to discover APIs ad hoc: When developing our application, we came up with new ideas about additional components to include, for example, our recipe-generating system. We frequently had to look for the correct APIs that would facilitate us being able to deliver this information to the user -- information that we did not have within our own servers. As a result, we learned how to quickly parse through various APIs and discover those that served our functional purposes best. We also learned to evaluate APIs based on different metrics such as cost, format, and accessibility. 3.Transferring Developmental Fundamentals to New Frameworks: Although we did not have any previous experience using Streamlit and only learned that it existed this morning, we were able to apply our knowledge of web development, specifically connectivity between frontend and backend, to separate our concerns and work independently without interfering with each other's work. This was despite some significant differences in Streamlit compared to other frameworks such as React, where frontend and backend are distinct. In Streamlit, front-end and back-end are more or less handled together, and we had to artificially structure the division.

What's next for NutriSafe

  1. Expanded Data Sources: Incorporate more databases to improve coverage of products and recipes.
  2. Advanced Personalization: Use AI to provide deeper personalization, such as suggesting recipes based on pantry inventory or dietary goals.
  3. Mobile App: Develop a mobile version for easier barcode scanning and accessibility.
  4. Partnerships: Collaborate with health and fitness apps, grocery stores, and sustainability initiatives to widen NutriSafe’s impact.
  5. Gamification: Introduce rewards for sustainable and healthy food choices to encourage user engagement.
  6. Real-Time Feedback: Add community-driven reviews and tips for product or recipe enhancements.

Built With

Share this project:

Updates