|
Download README.md from model-deployer/food-classifier-comparison: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/spaces/model-deployer/food-classifier-comparison/resolve/main/README.md
- Command line
-
hf download hf://spaces/model-deployer/food-classifier-comparison/README.md
-
curl -L -o README.md https://huggingface.co/spaces/model-deployer/food-classifier-comparison/resolve/main/README.md
1.2 kB
A newer version of the Gradio SDK is available: 6.32.0
metadata
title: Food Classifier with Model Comparison
emoji: π
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 4.19.2
app_file: app.py
pinned: false
π Food Classifier: Accuracy vs. Speed
This Gradio demo allows you to classify food images using two different transformer-based models and visually compare their performance.
How to Use
- Upload an Image: Drag and drop a food image or click to upload one. You can also use one of the examples below.
- Choose a Model: Select either the ViT or Swin model from the dropdown.
- Click Classify: The model will predict the food item.
The Comparison Feature
The key feature of this demo is the performance comparison chart:
- Benchmark Accuracy: This chart shows the reported accuracy of each model on the Food101 test set. The Swin model is generally more accurate.
- Inference Time: This chart shows the actual time it took for the selected model to process your uploaded image. You can see the speed trade-off firsthand. The ViT model is often faster.
This allows you to understand the classic machine learning trade-off between a model's accuracy and its computational cost (speed).