🧠 Inspiration Food allergies affect over 220 million people worldwide and can be life-threatening. But deciphering ingredient labels—especially those in tiny fonts or foreign languages—is tough. We wanted to make food safety effortless by simply taking a photo and letting AI do the rest. That’s how AllerScan was born.
🥗 What it does AllerScan is a Streamlit web app that helps users detect allergens and assess dietary compatibility from food ingredient labels.
How it works:
📸 Upload an image of a food label.
🔍 OCR with Tesseract extracts the text.
🤖 Sonar (Perplexity AI) analyzes ingredients and flags:
Common allergens (peanuts, dairy, soy, gluten, etc.)
Suitability for vegan, gluten-free, vegetarian, and dairy-free diets.
✅ Presents a clear, bullet-pointed report on food safety.
🔧 How we built it Frontend/UI: Streamlit for a fast, interactive interface.
OCR: Tesseract to extract text from uploaded food label images.
NLP/AI Analysis: Perplexity Sonar API for ingredient understanding, allergen flagging, and diet filtering.
Image Processing: Pillow for handling uploaded images.
🧗♂️ Challenges we ran into 🧾 Extracting clean and structured text from blurry or cluttered food labels via OCR.
🔄 Ensuring real-time interaction with the Sonar API while maintaining performance.
🌍 Handling ingredients with scientific names or multilingual packaging.
🛑 Designing prompts to Sonar that return medically accurate, safe information.
🏆 Accomplishments that we're proud of Built a fully working MVP within hours with real OCR and GenAI capability.
Successfully integrated OCR + GenAI for a meaningful use case.
Created an accessible, user-friendly app with zero learning curve.
Solved a real, high-stakes problem for people with allergies and dietary restrictions.
📚 What we learned How to combine OCR and LLMs to solve real-world problems.
How to design effective prompts for domain-specific safety tasks.
The power of simple UX + GenAI to deliver high-impact solutions.
Streamlit is 🔥 for rapid AI tool prototyping.
🚀 What's next for AllerScan 🏷️ Add barcode scanning for packaged goods.
🌐 Support for multilingual OCR (e.g., Japanese, French labels).
📲 Turn it into a mobile app using Streamlit Mobile or React Native.
🔁 Save & tag scan history for repeat checks.
🩺 Integrate with EHR systems to recommend foods based on medical history.
📊 Use Nutrition APIs to show calorie/macros/ingredient impact analysis.
📤 Let users share safe product lists for community curation.
Built With
- python
- sonar
- streamlit
Log in or sign up for Devpost to join the conversation.