Spaces:
Sleeping
Sleeping
Commit
·
0fdcf58
1
Parent(s):
16e5f33
done
Browse files
README.md
CHANGED
|
@@ -7,13 +7,13 @@ PlateMate is a smart and interactive web app that uses state-of-the-art AI techn
|
|
| 7 |
## Features
|
| 8 |
|
| 9 |
1. **Food Image Classification**
|
| 10 |
-
Upload an image of any dish, and
|
| 11 |
|
| 12 |
2. **Ingredient Suggestion**
|
| 13 |
Once classified, PlateMate provides a concise, AI-generated list of main ingredients for the dish, helping you understand what goes into your favorite foods.
|
| 14 |
|
| 15 |
3. **Healthier Alternatives**
|
| 16 |
-
PlateMate
|
| 17 |
|
| 18 |
4. **Sample Images**
|
| 19 |
Choose from predefined food images to try the app's features instantly.
|
|
@@ -27,8 +27,8 @@ PlateMate is a smart and interactive web app that uses state-of-the-art AI techn
|
|
| 27 |
|
| 28 |
1. **Streamlit**: For a responsive and user-friendly web interface.
|
| 29 |
2. **Hugging Face Transformers**: To classify food images using a custom pretrained model (`Shresthadev403/food-image-classification`).
|
| 30 |
-
3. **
|
| 31 |
-
4. **
|
| 32 |
5. **Python Libraries**: PIL for image handling, os for file operations.
|
| 33 |
|
| 34 |
---
|
|
@@ -80,10 +80,10 @@ Users can upload a food image or select a sample. The app displays the image in
|
|
| 80 |
Using the Hugging Face image classification pipeline, the app identifies the food item in the image.
|
| 81 |
|
| 82 |
### **3. Ingredient Generation**
|
| 83 |
-
The Hugging Face
|
| 84 |
|
| 85 |
-
### **4. Healthier Alternatives**
|
| 86 |
-
|
| 87 |
|
| 88 |
---
|
| 89 |
|
|
@@ -105,7 +105,7 @@ OpenAI GPT-4 generates a healthy recipe alternative for the dish, explaining why
|
|
| 105 |
| Backend Processing |
|
| 106 |
| - Image Classification (Hugging Face Transformers) |
|
| 107 |
| - Ingredients (Hugging Face Inference API) |
|
| 108 |
-
| - Healthy Recipes (
|
| 109 |
| |
|
| 110 |
+-----------------------------------------------------------+
|
| 111 |
| |
|
|
@@ -120,17 +120,11 @@ OpenAI GPT-4 generates a healthy recipe alternative for the dish, explaining why
|
|
| 120 |
|
| 121 |
## Example Use Case
|
| 122 |
|
| 123 |
-
1. **Upload an Image
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
-
|
| 128 |
-
|
| 129 |
-
3. **Ingredients**
|
| 130 |
-
- Generated: Flour, cheese, tomato sauce, olive oil, basil.
|
| 131 |
-
|
| 132 |
-
4. **Healthier Alternative**
|
| 133 |
-
- "Try a cauliflower crust pizza with reduced-fat cheese and fresh vegetables. It's lower in carbs and calories while being equally delicious!"
|
| 134 |
|
| 135 |
---
|
| 136 |
|
|
@@ -142,16 +136,6 @@ OpenAI GPT-4 generates a healthy recipe alternative for the dish, explaining why
|
|
| 142 |
|
| 143 |
---
|
| 144 |
|
| 145 |
-
## Screenshots
|
| 146 |
-
|
| 147 |
-
**1. Homepage**
|
| 148 |
-

|
| 149 |
-
|
| 150 |
-
**2. Classification Result**
|
| 151 |
-

|
| 152 |
-
|
| 153 |
-
---
|
| 154 |
-
|
| 155 |
## Contributing
|
| 156 |
|
| 157 |
We welcome contributions! To contribute:
|
|
@@ -173,16 +157,19 @@ Developed by Muhammad Hassan Butt.
|
|
| 173 |
Feel free to reach out via [GitHub](https://github.com/yourusername) or [LinkedIn](https://linkedin.com/in/yourprofile).
|
| 174 |
|
| 175 |
Happy cooking with **PlateMate**! 🎉
|
|
|
|
| 176 |
---
|
| 177 |
-
|
| 178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
colorFrom: purple
|
| 180 |
colorTo: green
|
| 181 |
sdk: streamlit
|
| 182 |
sdk_version: 1.40.1
|
| 183 |
app_file: app.py
|
| 184 |
pinned: false
|
| 185 |
-
short_description: Food
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 7 |
## Features
|
| 8 |
|
| 9 |
1. **Food Image Classification**
|
| 10 |
+
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.
|
| 11 |
|
| 12 |
2. **Ingredient Suggestion**
|
| 13 |
Once classified, PlateMate provides a concise, AI-generated list of main ingredients for the dish, helping you understand what goes into your favorite foods.
|
| 14 |
|
| 15 |
3. **Healthier Alternatives**
|
| 16 |
+
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.
|
| 17 |
|
| 18 |
4. **Sample Images**
|
| 19 |
Choose from predefined food images to try the app's features instantly.
|
|
|
|
| 27 |
|
| 28 |
1. **Streamlit**: For a responsive and user-friendly web interface.
|
| 29 |
2. **Hugging Face Transformers**: To classify food images using a custom pretrained model (`Shresthadev403/food-image-classification`).
|
| 30 |
+
3. **GPT-4 as a RAG System**: Combines retrieval-based data with generative capabilities to suggest healthier alternatives based on AI-generated insights.
|
| 31 |
+
4. **Hugging Face Inference API**: To generate key ingredients for classified dishes.
|
| 32 |
5. **Python Libraries**: PIL for image handling, os for file operations.
|
| 33 |
|
| 34 |
---
|
|
|
|
| 80 |
Using the Hugging Face image classification pipeline, the app identifies the food item in the image.
|
| 81 |
|
| 82 |
### **3. Ingredient Generation**
|
| 83 |
+
The Hugging Face NLP model suggests the main ingredients for the identified dish.
|
| 84 |
|
| 85 |
+
### **4. Healthier Alternatives with GPT-4 RAG**
|
| 86 |
+
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.
|
| 87 |
|
| 88 |
---
|
| 89 |
|
|
|
|
| 105 |
| Backend Processing |
|
| 106 |
| - Image Classification (Hugging Face Transformers) |
|
| 107 |
| - Ingredients (Hugging Face Inference API) |
|
| 108 |
+
| - Healthy Recipes (GPT-4 RAG) |
|
| 109 |
| |
|
| 110 |
+-----------------------------------------------------------+
|
| 111 |
| |
|
|
|
|
| 120 |
|
| 121 |
## Example Use Case
|
| 122 |
|
| 123 |
+
1. **Upload an Image**: A user uploads an image of a pizza.
|
| 124 |
+
2. **Classification Output**: Food: Pizza (97.65% confidence)
|
| 125 |
+
3. **Ingredients**: Generated: Flour, cheese, tomato sauce, olive oil, basil.
|
| 126 |
+
4. **Healthier Alternative**:
|
| 127 |
+
"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!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
---
|
| 130 |
|
|
|
|
| 136 |
|
| 137 |
---
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
## Contributing
|
| 140 |
|
| 141 |
We welcome contributions! To contribute:
|
|
|
|
| 157 |
Feel free to reach out via [GitHub](https://github.com/yourusername) or [LinkedIn](https://linkedin.com/in/yourprofile).
|
| 158 |
|
| 159 |
Happy cooking with **PlateMate**! 🎉
|
| 160 |
+
|
| 161 |
---
|
| 162 |
+
|
| 163 |
+
## Hugging Face Configuration
|
| 164 |
+
|
| 165 |
+
```yaml
|
| 166 |
+
title: PlateMate
|
| 167 |
+
emoji: 🍽️
|
| 168 |
colorFrom: purple
|
| 169 |
colorTo: green
|
| 170 |
sdk: streamlit
|
| 171 |
sdk_version: 1.40.1
|
| 172 |
app_file: app.py
|
| 173 |
pinned: false
|
| 174 |
+
short_description: Food classification with GPT-4-powered healthier alternatives.
|
| 175 |
+
```
|
|
|
|
|
|