Spaces:
Sleeping
Sleeping
Upload README.md
Browse files
README.md
CHANGED
|
@@ -6,7 +6,6 @@ colorTo: pink
|
|
| 6 |
sdk: gradio
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
-
license: mit
|
| 10 |
---
|
| 11 |
|
| 12 |
# FoodViT - Food Classification Application
|
|
@@ -21,6 +20,7 @@ A production-ready food classification application using Vision Transformer (ViT
|
|
| 21 |
- **Production Ready**: Modular, well-structured codebase with proper error handling
|
| 22 |
- **Dynamic Example Images**: Example images are randomly selected from `assets/samples/` at each app launch
|
| 23 |
- **Easy Deployment**: Simple setup and configuration
|
|
|
|
| 24 |
|
| 25 |
## π Project Structure
|
| 26 |
|
|
@@ -32,8 +32,6 @@ FoodViT/
|
|
| 32 |
βββ requirements.txt # Python dependencies
|
| 33 |
βββ README.md # This file
|
| 34 |
βββ INSTALLATION.md # Installation and troubleshooting guide
|
| 35 |
-
βββ model/
|
| 36 |
-
β βββ bestViT_PT.pth # Trained PyTorch model
|
| 37 |
βββ utils/
|
| 38 |
β βββ model_loader.py # Model loading utilities
|
| 39 |
β βββ image_processor.py # Image preprocessing
|
|
@@ -153,6 +151,7 @@ print(f"Predicted: {result['class']} ({result['confidence']:.2%})")
|
|
| 153 |
- **Classes**: 3 (pizza, steak, sushi)
|
| 154 |
- **Training Data**: Pizza-Steak-Sushi dataset
|
| 155 |
- **Framework**: PyTorch with Transformers
|
|
|
|
| 156 |
|
| 157 |
## π οΈ Development
|
| 158 |
|
|
@@ -160,7 +159,6 @@ print(f"Predicted: {result['class']} ({result['confidence']:.2%})")
|
|
| 160 |
|
| 161 |
- **`utils/`**: Core utilities for model loading, image processing, and prediction
|
| 162 |
- **`interface/`**: Web interface components
|
| 163 |
-
- **`model/`**: Trained model files
|
| 164 |
- **`assets/samples/`**: Example images and static assets
|
| 165 |
|
| 166 |
### Adding New Features
|
|
@@ -175,6 +173,7 @@ print(f"Predicted: {result['class']} ({result['confidence']:.2%})")
|
|
| 175 |
- All unnecessary files and caches have been removed
|
| 176 |
- Example images are dynamically loaded
|
| 177 |
- No test or debug files in the repo
|
|
|
|
| 178 |
- Ready for production and version control
|
| 179 |
|
| 180 |
## π Troubleshooting
|
|
@@ -202,4 +201,4 @@ For questions and support:
|
|
| 202 |
|
| 203 |
---
|
| 204 |
|
| 205 |
-
**Enjoy classifying your food images! ππ₯©π£**
|
|
|
|
| 6 |
sdk: gradio
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# FoodViT - Food Classification Application
|
|
|
|
| 20 |
- **Production Ready**: Modular, well-structured codebase with proper error handling
|
| 21 |
- **Dynamic Example Images**: Example images are randomly selected from `assets/samples/` at each app launch
|
| 22 |
- **Easy Deployment**: Simple setup and configuration
|
| 23 |
+
- **Model weights hosted on Hugging Face Hub**: The model file is not included in this repository; it is automatically downloaded from the Hugging Face Model Hub at runtime.
|
| 24 |
|
| 25 |
## π Project Structure
|
| 26 |
|
|
|
|
| 32 |
βββ requirements.txt # Python dependencies
|
| 33 |
βββ README.md # This file
|
| 34 |
βββ INSTALLATION.md # Installation and troubleshooting guide
|
|
|
|
|
|
|
| 35 |
βββ utils/
|
| 36 |
β βββ model_loader.py # Model loading utilities
|
| 37 |
β βββ image_processor.py # Image preprocessing
|
|
|
|
| 151 |
- **Classes**: 3 (pizza, steak, sushi)
|
| 152 |
- **Training Data**: Pizza-Steak-Sushi dataset
|
| 153 |
- **Framework**: PyTorch with Transformers
|
| 154 |
+
- **Model weights**: Downloaded automatically from the Hugging Face Model Hub ([see model repo](https://huggingface.co/mahmoudalrefaey/FoodViT-weights))
|
| 155 |
|
| 156 |
## π οΈ Development
|
| 157 |
|
|
|
|
| 159 |
|
| 160 |
- **`utils/`**: Core utilities for model loading, image processing, and prediction
|
| 161 |
- **`interface/`**: Web interface components
|
|
|
|
| 162 |
- **`assets/samples/`**: Example images and static assets
|
| 163 |
|
| 164 |
### Adding New Features
|
|
|
|
| 173 |
- All unnecessary files and caches have been removed
|
| 174 |
- Example images are dynamically loaded
|
| 175 |
- No test or debug files in the repo
|
| 176 |
+
- Model weights are not included in the repo (downloaded from the Hub)
|
| 177 |
- Ready for production and version control
|
| 178 |
|
| 179 |
## π Troubleshooting
|
|
|
|
| 201 |
|
| 202 |
---
|
| 203 |
|
| 204 |
+
**Enjoy classifying your food images! ππ₯©π£**
|