Our project, Truthify, is designed to enhance consumer trust and transparency in packaged food products by leveraging AI to analyze and verify health-related claims. The application is a part of the broader ConsumeWise initiative, which aims to help consumers make informed and healthier choices. In this project, users input a food product, and we use ZenRows, BeautifulSoup for web scraping to retrieve the list of ingredients, or the user can enter them manually. The API assesses whether the ingredients genuinely support the claim and provides a verdict on whether the product stays true to its promise.
One major challenge we faced was avoiding the need for users to manually input long lists of ingredients. Initially, we considered web scraping, but many ingredient labels weren't available online. After discovering that BigBasket often provided images of ingredient labels for their products, we decided to scrape these. However, the location of the ingredient image varied by product, making the scraping process inconsistent.
To overcome this, we researched a large number of products to find patterns and implemented a solution, though it's still not 100% robust. Additionally, we encountered blocks when trying to download images from BigBasket's database, but we resolved this by passing appropriate headers and using ZenRows to bypass the firewall.
Another challenge involved fine-tuning Gemini to accurately extract ingredients from product labels. The initial text extraction wasn’t perfect, so we created custom prompts to optimize the accuracy of ingredient extraction. This allowed us to better capture the necessary details from various label formats and improve the overall performance of the system.
This was also the first hackathon for all of us together, making it a bit tough to manage, communicate, and handle everything. However, through strong communication and teamwork, we overcame those difficulties and successfully delivered the project.
Tracks Applied (1)
Discussion