This repository features an image classification model capable of distinguishing between fugazzeta (an Argentine pizza variant) and standard pizza. The model was built using the fastai library, leveraging a pre-trained convnext_tiny architecture and fine-tuned over 4 epochs. The data pipeline included downloading images, verifying file integrity, and applying data augmentation techniques. The trained model, along with its learned weights, is saved in both the standard model.pkl for easy deployment and portability.
This is my first AI/ML project following the Practical Deep Learning for Coders course by Jeremy Howard.
Fugazzeta is a traditional Argentine pizza style originating from Buenos Aires. It's characterized by its thick, fluffy dough filled with mozzarella cheese, topped with sweet onions, and often finished with oregano and olive oil. Unlike regular pizza, fugazzeta has cheese both inside the dough and on top, creating a unique double-cheese experience.
- AI-Powered Classification: Uses a custom-trained machine learning based on fastAI to identify fugazzeta pizzas
- Mobile-First Design: Responsive layout optimized for all screen sizes
- Bilingual Support: Toggle between English and Spanish
- Confidence Scores: Shows prediction confidence with visual progress bars
- Pizza-Themed UI: Warm, inviting color scheme with smooth animations
- Fast & Lightweight: Built with Vite for optimal performance
- Frontend: React 18 + TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Icons: Lucide React
- ML API: Gradio Client (HuggingFace)
- Model: PyTorch / FastAI
- Clone the repository:
git clone https://github.com/yourusername/fugazzeta-detector.git
cd fugazzeta-detector- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
npm run buildThe production-ready files will be in the dist directory.
- Click or tap the upload area to select a pizza image
- Wait for the image to upload and preview
- Click "Analyze Pizza" (or "Analizar Pizza" in Spanish)
- View the classification result with confidence percentage
- Try another pizza or toggle between English and Spanish
fugazzeta-detector/
├── src/
│ ├── App.tsx # Root component
│ └── main.tsx # Entry point
├── package.json
├── vite.config.ts
├── tailwind.config.js
└── README.md
This project connects to a custom Gradio model hosted on HuggingFace Spaces:
const client = await Client.connect("jonorl/fugazzeta");
const result = await client.predict("/predict", { img: imageBlob });The model returns predictions with labels and confidence scores for classification.
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
{
"react": "^18.x",
"lucide-react": "^0.263.1",
"@gradio/client": "latest"
}