🥗 Eco-Chef AI: Turning Waste into Taste 💡 The Inspiration I was inspired by the staggering statistic that nearly 33% of all food produced globally goes to waste. Most of this happens in our own kitchens because we simply don't know what to do with that "last bit" of spinach or a single lonely egg. I wanted to build a tool that uses Artificial Intelligence to empower people to be more sustainable, one meal at a time. 🛠️ How I Built It I used a modern tech stack to bridge the gap between computer vision and culinary creativity:Frontend: [Streamlit] for a fast, responsive web interface.Intelligence: [Google Gemini 2.5 Flash] to analyze both images and text.Logic: Python handles the data flow and image processing.Deployment: GitHub for version control and Streamlit Cloud for hosting. 🧠 What I LearnedDuring this journey, I deepened my understanding of: Prompt Engineering: How to instruct an AI to act as a "Zero-Waste Chef."API Integration: Securely connecting a frontend to a powerful Large Language Model (LLM).Sustainability Metrics: Calculating how small kitchen choices impact the environment.The logic behind the environmental impact follows the concept of Carbon Footprint avoidance. If $C_{total}$ is the total carbon footprint of a meal and $W_{saved}$ is the weight of food diverted from a landfill, we aim to maximize:$$S = \sum (W_{saved} \times EF_{food})$$Where $S$ is the CO2 savings and $EF$ is the emission factor for that specific food group.🚧 Challenges I FacedThe biggest hurdle was State Management. In my early versions, whenever I uploaded a photo, the text input would disappear! I had to learn how to structure my code logic so the AI could intelligently check for multiple types of input (Images vs. Text) without crashing the user's session. I also had to overcome several Indentation and Syntax errors while setting up the API's "try-except" blocks.

Built With

Share this project:

Updates