File size: 7,524 Bytes
5e6bcbf 06d0a3d 5e6bcbf 06d0a3d 00148db 5e6bcbf 06d0a3d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | ---
title: Min StyleMatch AI
emoji: π
colorFrom: gray
colorTo: green
sdk: gradio
sdk_version: 5.33.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: LLM-Powered Styling & Color Analysis via MCP Server + Gradio
tags:
- Agents-MCP-Hackathon
- agent-demo-track
- mcp-server-track
---
# Project Name: Min-StyleMatch AI β LLM-Powered Styling & Color Analysis via MCP Server + Gradio Client
---
## π¬ Demo Video
[](https://www.youtube.com/watch?v=VvRdsgGUVJQ)
---
## π Table of Contents
- [π§ Project Overview](#-project-overview)
- [π§ Tools Integrated](#-tools-integrated)
- [β οΈ Project Status](#οΈ-note-this-project-is-not-production-ready)
- [π Models Used](#-models-used)
- [π¦ Open-Source Models (via Nebius)](#-open-source-models-via-nebius)
- [π Closed-Source Models (via OpenAI)](#-closed-source-models-via-openai)
- [π§© System Architecture Overview](#-system-architecture-overview)
- [π Quickstart](#-quickstart)
- [π Your Data & Privacy](#-your-data--privacy)
- [π§ Chat History](#-chat-history)
- [πΌοΈ Image Handling](#οΈ-image-handling)
- [π¨ Facial Color Data](#-facial-color-data)
- [β
Dataset Overview](#-dataset-overview)
- [π Data Processing Steps](#-data-processing-steps)
- [π¦ Output](#-output)
---
## π§ Project Overview
This project uses **FastMCP** for custom **MCP (Model Context Protocol)** server and a **Gradio Chatbot** as an **MCP Client**, designed to demonstrate how Language Models (LLMs) can interact with tools for advanced reasoning and personalization.
### π§ Tools Integrated
1. **π§βπ» Developer Info Tool**
* Returns information about the developer (you).
* Purpose: Demonstrates how **MCP tool calling** supports **prompt decomposition**, allowing the LLM to delegate parts of the task to improve response accuracy and structure.
2. **ποΈ Product Filtering Tool**
* Connects the LLM with product data stored in `.csv` files (used as a lightweight database).
* Purpose: Showcases how LLMs can support **product recommendation systems** by filtering based on user preferences, color suitability, or product attributes.
3. **π¨ Color Season Analysis Tool**
* Operates in an **Agent-based setup** using two LLMs:
* One extracts **facial feature colors** (e.g., skin, eyes, hair, lips) from a user-uploaded image.
* The second uses this data to predict the **userβs color season**.
* Purpose: Demonstrates **multi-model collaboration**, improving accuracy by separating image understanding from season classification.
*(Combining both steps into one model often resulted in inconsistent or random outputs.)*
---
> β οΈ **Note:** This project is **not production-ready**.
> It is a **demo prototype** built to:
>
> * Showcase how to integrate product data with LLMs using **tool calling**.
> * Demonstrate **multi-model collaboration** (e.g., using image and text models in tandem).
> * Illustrate **prompt decomposition** and how MCP (Model Context Protocol) enables modular reasoning through tool-based workflows.
>
> While functional, the current version has **non-optimized system flow**, **basic tool logic**, and **initial prompt configurations**.
> These areas can be significantly improved for better performance, scalability, and production-readiness.
>
> This project is intended as a **learning resource** and a practical starting point for **junior developers**, **LLM enthusiasts**, or teams exploring how to combine AI tools with real-world datasets.
>
> With future iterationsβsuch as improved orchestration, tighter prompt design, and scalable backend architectureβit can evolve into a robust, intelligent personalization system.
---
## π Models Used
### π¦ Open-Source Models (via Nebius)
* **Qwen2.5-VL-72B-Instruct** β For visual-linguistic processing.
* **Mistral-Nemo-Instruct-2407** β For general instruction-following tasks.
### π Closed-Source Models (via OpenAI)
* **GPT-4o-mini** *(primary for tool-calling)*
* **GPT-4.1-mini**
> β οΈ *Note:* Currently, only OpenAI models are used for **tool calling**, as their API is more mature and familiar.
> I have not explored whether **Nebius supports tool calling**.
---
## π§© System Architecture Overview
```mermaid
graph TD
User["π§ User"]
Gradio["π€ Gradio MCP Client"]
FastMCP["π οΈ FastMCP Server"]
Tool1["π§βπ» Developer Info Tool"]
Tool2["ποΈ Product Filter Tool"]
Tool3["π¨ Color Season Tool"]
LLM["π§ LLM (OpenAI / Nebius)"]
User --> Gradio
Gradio --> FastMCP
FastMCP --> Tool1
FastMCP --> Tool2
FastMCP --> Tool3
Tool3 --> LLM
Tool1 --> LLM
Tool2 --> LLM
```
---
## π Quickstart
1. **Clone the repository**
```bash
git clone https://github.com/yourusername/stylematch-assistant.git
cd stylematch-assistant
pip install -r requirements.txt
```
---
## π Your Data & Privacy
This project requires the use of the **OpenAI API** and optionally the **Nebius AI Studio API**. All API keys are **encrypted** and **never exposed in plain text**.
This is a **demo project**, and for your safety and control, I recommend cloning the repository and running it locally on your machine.
### π§ Chat History
* Your conversation is **not stored permanently**.
* Chat history will be **cleared** if you **refresh the browser** or **close the session**.
### πΌοΈ Image Handling
* When you upload a face image, it is stored **temporarily** for analysis.
* If you're **inactive** or stop interacting with the assistant, the image will be **automatically deleted**.
* No facial image is permanently saved.
### π¨ Facial Color Data
* The extracted **skin, hair, eyes, lips colors**, and your **color season result** are handled just like your imageβ**temporary and private**.
* This information is only used to **enhance your personalized experience** and is **not retained** after your session ends.
---
## β
Dataset Overview
This project uses the [Fashion Product Images Dataset](https://www.kaggle.com/datasets/paramaggarwal/fashion-product-images-dataset) from Kaggle, which contains metadata and image filenames for over 44,000 fashion products.
The dataset consists of two key files:
* **`styles.csv`** β contains product metadata such as category, gender, and usage.
* **`images.csv`** β contains filenames of product images, linked to the product via the `id` column.
### π Data Processing Steps
The function `load_combined_dataset(styles_path, images_path)` performs the following operations:
1. **Load CSV Files**
* Reads `styles.csv` and `images.csv`.
* Skips malformed lines automatically to avoid read errors.
2. **Prepare for Merge**
* Cleans the `filename` column in `images.csv` by stripping `.jpg` and converting it into integer `id` for merging.
3. **Data Cleaning**
* Drops all rows with missing (`NaN`) values from both DataFrames.
* Merges the two DataFrames on the `id` column using an inner join.
* Ensures the resulting combined dataset has no null values.
4. **Filter Relevant Categories**
* Since this is a demo, I keeps only the products that belong to **Apparel** or **Footwear** categories (ignores others such as Accessories).
### π¦ Output
The function returns a cleaned and filtered `pandas.DataFrame` containing only products ready for personalized styling and analysis.
---
|