Spaces:
Sleeping
Sleeping
Commit ·
0fdcf58
1
Parent(s): 16e5f33
done
Browse files6 unmodified lines789101112131415161718197 unmodified lines272829303132333445 unmodified lines8081828384858687888915 unmodified lines1051061071081091101118 unmodified lines1201211221231241251261271281291301311321331341351365 unmodified lines14214314414514614714814915015115215315415515615715 unmodified lines1731741751761771781791801811821831841851861871886 unmodified lines## Features1. **Food Image Classification**Upload an image of any dish, and DPlateMate will identify the food with a high level of confidence. It uses a pretrained image classification model tailored for food.2. **Ingredient Suggestion**Once classified, PlateMate provides a concise, AI-generated list of main ingredients for the dish, helping you understand what goes into your favorite foods.3. **Healthier Alternatives**PlateMate doesn't stop at identification—it also suggests healthier alternatives for the classified dish using the power of OpenAI's GPT models.4. **Sample Images**Choose from predefined food images to try the app's features instantly.7 unmodified lines1. **Streamlit**: For a responsive and user-friendly web interface.2. **Hugging Face Transformers**: To classify food images using a custom pretrained model (`Shresthadev403/food-image-classification`).3. **Hugging Face Inference API**: To generate key ingredients for classified dishes.4. **OpenAI GPT-4**: To provide healthier recipe alternatives and insights.5. **Python Libraries**: PIL for image handling, os for file operations.---45 unmodified linesUsing the Hugging Face image classification pipeline, the app identifies the food item in the image.### **3. Ingredient Generation**The Hugging Face Qwen NLP model suggests the main ingredients for the identified dish.### **4. Healthier Alternatives**OpenAI GPT-4 generates a healthy recipe alternative for the dish, explaining why it is a better choice.---15 unmodified lines| Backend Processing || - Image Classification (Hugging Face Transformers) || - Ingredients (Hugging Face Inference API) || - Healthy Recipes (OpenAI GPT-4) || |+-----------------------------------------------------------+| |8 unmodified lines## Example Use Case1. **Upload an Image**A user uploads an image of a pizza.2. **Classification Output**- Food: Pizza (97.65% confidence)3. **Ingredients**- Generated: Flour, cheese, tomato sauce, olive oil, basil.4. **Healthier Alternative**- "Try a cauliflower crust pizza with reduced-fat cheese and fresh vegetables. It's lower in carbs and calories while being equally delicious!"---5 unmodified lines---## Screenshots**1. Homepage****2. Classification Result**---## ContributingWe welcome contributions! To contribute:15 unmodified linesFeel free to reach out via [GitHub](https://github.com/yourusername) or [LinkedIn](https://linkedin.com/in/yourprofile).Happy cooking with **PlateMate**! 🎉---title: CTP Projectemoji: ⚡colorFrom: purplecolorTo: greensdk: streamlitsdk_version: 1.40.1app_file: app.pypinned: falseshort_description: Food image recognition models that recognizes food.---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference6 unmodified lines789101112131415161718197 unmodified lines272829303132333445 unmodified lines8081828384858687888915 unmodified lines1051061071081091101118 unmodified lines1201211221231241251261271281291305 unmodified lines13613713813914014115 unmodified lines1571581591601611621631641651661671681691701711721731741756 unmodified lines## Features1. **Food Image Classification**Upload an image of any dish, and PlateMate will identify the food with a high level of confidence using a pretrained image classification model tailored for food.2. **Ingredient Suggestion**Once classified, PlateMate provides a concise, AI-generated list of main ingredients for the dish, helping you understand what goes into your favorite foods.3. **Healthier Alternatives**PlateMate goes beyond basic suggestions with **GPT-4-powered Retrieval-Augmented Generation (RAG)** to provide personalized, healthier alternatives for your favorite dishes. This cutting-edge approach ensures the recommendations are both relevant and grounded in accurate information.4. **Sample Images**Choose from predefined food images to try the app's features instantly.7 unmodified lines1. **Streamlit**: For a responsive and user-friendly web interface.2. **Hugging Face Transformers**: To classify food images using a custom pretrained model (`Shresthadev403/food-image-classification`).3. **GPT-4 as a RAG System**: Combines retrieval-based data with generative capabilities to suggest healthier alternatives based on AI-generated insights.4. **Hugging Face Inference API**: To generate key ingredients for classified dishes.5. **Python Libraries**: PIL for image handling, os for file operations.---45 unmodified linesUsing the Hugging Face image classification pipeline, the app identifies the food item in the image.### **3. Ingredient Generation**The Hugging Face NLP model suggests the main ingredients for the identified dish.### **4. Healthier Alternatives with GPT-4 RAG**GPT-4, integrated as a RAG system, retrieves relevant nutritional data and combines it with generative capabilities to suggest healthier, personalized recipe alternatives. This ensures scientifically accurate and context-aware recommendations.---15 unmodified lines| Backend Processing || - Image Classification (Hugging Face Transformers) || - Ingredients (Hugging Face Inference API) || - Healthy Recipes (GPT-4 RAG) || |+-----------------------------------------------------------+| |8 unmodified lines## Example Use Case1. **Upload an Image**: A user uploads an image of a pizza.2. **Classification Output**: Food: Pizza (97.65% confidence)3. **Ingredients**: Generated: Flour, cheese, tomato sauce, olive oil, basil.4. **Healthier Alternative**:"Try a cauliflower crust pizza with reduced-fat cheese and fresh vegetables. GPT-4 RAG ensures that this option is both lower in calories and higher in nutritional value, offering the best balance between health and flavor!"---5 unmodified lines---## ContributingWe welcome contributions! To contribute:15 unmodified linesFeel free to reach out via [GitHub](https://github.com/yourusername) or [LinkedIn](https://linkedin.com/in/yourprofile).Happy cooking with **PlateMate**! 🎉---## Hugging Face Configuration```yamltitle: PlateMateemoji: 🍽️colorFrom: purplecolorTo: greensdk: streamlitsdk_version: 1.40.1app_file: app.pypinned: falseshort_description: Food classification with GPT-4-powered healthier alternatives.```
README.md+22-35