Skip to content

AI Stylist uses RAG hybrid architecture, analyzes outfits from photos and recommends fashion items using Gemini, Hugging Face, and MongoDB Vector Search.

License

Notifications You must be signed in to change notification settings

vero-code/aspetto-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👗 Aspetto AI – Personal Fashion Recommender

Cloud Run Made with FastAPI Frontend: Firebase Hosting MongoDB Vector Search Built with Gemini

Analyze outfits, get fashion advice, and explore similar styles — all powered by AI in the cloud.

AI Stylist is a web app that analyzes your outfit photo and gives personalized fashion insights and item recommendations using Google Gemini and MongoDB Vector Search.

⚙️ Stack

  • Frontend: React + Tailwind CSS, deployed via Firebase Hosting
  • Backend: FastAPI (Python), containerized with Docker, deployed on Cloud Run using Cloud Build and Artifact Registry
  • Database: MongoDB Atlas with Vector Search
  • AI: Gemini Vision + custom prompt engineering
  • Embeddings Generator: thenlper/gte-small an open-source General Text Embeddings (GTE) model from Hugging Face
  • Dataset: Fashion Product Images Dataset (44k products) from Kaggle

✨ Features

  • Upload a photo of your outfit
  • Get vision-based fashion advice from an AI
  • Browse semantic recommendations powered by vector search
  • Stylish UI with markdown-formatted advice and tag-based item breakdown

🧠 How It Works

  1. Image is sent to a FastAPI backend
  2. Gemini analyzes the image and returns structured fashion advice
  3. Advice is vectorized using GTE model
  4. Searched in MongoDB to find semantically similar items
  5. Results and insights are returned to the frontend

🛠️ Local Development

⚙️ Configure

Create and fill out backend/.env and frontend/.env files.

Example files are provided in the respective folders.

Backend

cd backend
pip install -r requirements.txt
python -m venv venv
venv\Scripts\activate
uvicorn app.main:app --reload

Frontend

cd frontend
npm install
npm run dev

📁 Project Structure

backend/
├── app/
│   ├── gemini/
│   │   └── vision.py                      # Processes image → extracts data
│   ├── services/
│   │   ├── generate_vector.py             # Creates a vector
│   │   └── vector_search.py               # Vector Search in MongoDB
│   └── main.py                            # FastAPI endpoints
│
├── data/                                  # Examples csv files
│
└── scripts/
    ├── db/
    │   ├── connect.py                     # Connecting to MongoDB Atlas
    │   └── crud.py                        # CRUD operations
    │
    ├── prepare/
    │   ├── embedding/
    │   │   ├── build_text.py              # Prepares .csv file for vectorization
    │   │   └── generate_vectors_to_csv.py # Generate embeddings for .csv file
    │   ├── fix_styles_csv.py              # Replaces commas with quotes
    │   └── merge_with_images.py           # Combines metadata with images
    │
    └── upload/
        └── upload_final_dataset.py        # Loads prepared data into MongoDB
...

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.

About

AI Stylist uses RAG hybrid architecture, analyzes outfits from photos and recommends fashion items using Gemini, Hugging Face, and MongoDB Vector Search.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published