This project is a web application that uses a small, custom-trained image classifier based on a Convolutional Neural Network (CNN). The app allows users to upload or take a photo, and the model predicts which of five traditional objects appears in the image, providing a brief audio description in Spanish.
Example of the image carousel on the main page.
- Image Classification: Upload or take a photo and get a prediction of which object is present.
- Audio Description: Listen to a short audio description of the predicted object (in Spanish).
- Image Carousel: Browse sample images of the five categories.
- Modern UI: Built with Next.js, React, and Tailwind CSS for a responsive and clean interface.
The model can classify images into the following categories:
- Cacao
- Metate
- Molinillo
- Mortero
- U-shaped chair
- Upload/Take a Photo: Use the form on the main page to upload or capture an image.
- Prediction: The image is sent to a FastAPI backend (not included in this repo) at
http://127.0.0.1:8000/uploadfile. - Result: The predicted category and an audio description are displayed.
- Node.js (v18+ recommended)
- npm
-
Clone the repository:
git clone <repo-url> cd frontend-AI-guide
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
This frontend expects a backend running at http://127.0.0.1:8000/uploadfile that accepts image uploads and returns predictions and audio files.
Note: The backend is not included in this repository.
src/
app/
components/
NavBar.tsx # Navigation bar component
server_actions/
predict.ts # Handles API requests to the backend
page.tsx # Main page with carousel, upload form, and results
layout.tsx # App layout and font setup
public/
images/ # Sample images for the carousel
cacao.jpg
metate.jpg
molinillo.jpg
mortero.jpg
silla_u.jpg
- Next.js
- React
- Tailwind CSS
- lucide-react (for icons)
- To change the categories or images, update the
carouselImagesarray insrc/app/page.tsxand add/remove images inpublic/images/. - To change the backend endpoint, update the URL in
src/app/server_actions/predict.ts.
MIT License
Copyright (c) 2025 Jeremy Alexander Ramírez Galeotti