File size: 5,781 Bytes
23ddaac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: StyleSync AI
emoji: πŸ‘Ÿ
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
---

<div align="center">

# πŸš€ StyleSync AI

### Autonomous E-Commerce Catalog Intelligence

![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=for-the-badge&logo=python&logoColor=white)
![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=for-the-badge&logo=fastapi&logoColor=white)
![Google Gemini](https://img.shields.io/badge/Gemini_2.5_Flash-4285F4?style=for-the-badge&logo=google&logoColor=white)
![Pinecone](https://img.shields.io/badge/Pinecone-000000?style=for-the-badge&logo=pinecone&logoColor=white)
![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white)

---

*A multi-agent AI pipeline that converts raw product imagery into enterprise-grade, SEO-optimized e-commerce catalogs in seconds.*

</div>

---

## 🎯 Core Value Proposition

StyleSync AI eliminates the manual bottleneck of product catalog creation. By orchestrating **Computer Vision**, **Retrieval-Augmented Generation (RAG)**, and **Large Language Models** in a seamless autonomous pipeline, it delivers production-ready product listings β€” from a single image upload β€” with zero human intervention.

---

## πŸ—οΈ System Architecture

The system employs a high-performance, event-driven architecture orchestrated by **FastAPI**:

### πŸ‘οΈ Visual Analyst Agent
- **Function**: Zero-shot product image analysis
- **Process**: Extracts granular visual attributes β€” dominant colors, material composition, design style, branding elements, and product classification
- **Engine**: `Gemini 2.5 Flash` via the unified **Google GenAI SDK** (`google-genai`)

### 🧠 Semantic Memory Agent
- **Function**: RAG-based keyword retrieval with intelligent fallback
- **Process**: Vectorizes visual attributes to query a high-dimensional index, retrieving historically high-converting SEO keywords and market trends. When the database has no match for a niche, the **Intelligence Fallback** system autonomously generates keywords via Gemini β€” ensuring **0% empty results**
- **Engine**: `Pinecone Vector DB` with `gemini-embedding-001` embeddings (768 dimensions)

### ✍️ Writer Agent
- **Function**: High-conversion copy synthesis
- **Process**: Fuses visual intelligence with retrieved market data to generate persuasive, conversion-optimized titles, descriptions, and feature bullet points
- **Engine**: `Meta Llama 3.3 70B` (via Groq Cloud)

### βš™οΈ Pipeline Orchestrator
- **Function**: Async pipeline management & delivery
- **Process**: Handles non-blocking agent execution, error propagation, and API lifecycle management. Results are delivered instantly through the **Premium Glassmorphism UI**
- **Engine**: `FastAPI` with async/await architecture

---

## πŸ–₯️ Production Interface

StyleSync AI ships with a **Premium Glassmorphism UI** built for instant catalog generation:

- 🎨 Frosted-glass aesthetic with dynamic gradient backgrounds
- πŸ“€ Drag-and-drop image upload with real-time processing feedback
- πŸ“Š Structured JSON output display for visual data, SEO keywords, and generated listings
- πŸ“± Fully responsive design across desktop, tablet, and mobile

---

## πŸ› οΈ Technology Stack

| Layer | Technology | Purpose |
|-------|-----------|---------|
| **Runtime** | Python 3.10+ | Core language |
| **Framework** | FastAPI | Async API orchestration |
| **AI SDK** | `google-genai` (Unified) | Vision & embedding inference |
| **Vision Model** | Gemini 2.5 Flash | Product image analysis |
| **Embeddings** | `gemini-embedding-001` | 768-dim vector generation |
| **Vector DB** | Pinecone (Serverless) | Semantic keyword retrieval |
| **LLM** | Llama 3.3 70B (Groq) | Copywriting synthesis |
| **UI** | Glassmorphism / Tailwind CSS | Production dashboard |
| **Deployment** | Docker / Hugging Face Spaces | Containerized hosting |

---

## πŸ“‹ System Updates & Technical Milestones

| Date | Milestone |
|------|-----------|
| **Feb 2026** | βœ… Full migration from deprecated `google-generativeai` to unified `google-genai` SDK |
| **Feb 2026** | βœ… Vision model upgraded to `Gemini 2.5 Flash` for industry-leading latency |
| **Feb 2026** | βœ… Pinecone vector alignment to `768 dimensions` with `gemini-embedding-001` for mathematical precision |
| **Feb 2026** | βœ… **Intelligence Fallback** system deployed β€” guarantees 0% empty SEO keyword results |
| **Feb 2026** | βœ… n8n webhook decoupled β€” pipeline relies strictly on the Glassmorphism UI for delivery |
| **Feb 2026** | βœ… Production Glassmorphism dashboard launched |

---

## πŸš€ Quick Start

### 1. Environment Configuration

Create a `.env` file in the project root with the following keys:

```env
GEMINI_API_KEY=your_google_genai_api_key
GROQ_API_KEY=your_groq_cloud_api_key
PINECONE_API_KEY=your_pinecone_api_key
```

### 2. Installation

```bash
pip install -r requirements.txt
```

### 3. Launch

```bash
python main.py
```

The production dashboard will be available at `http://localhost:7860`.

---

## πŸ“ Project Structure

```
StyleSync-AI/
β”œβ”€β”€ main.py                  # FastAPI orchestrator & pipeline logic
β”œβ”€β”€ dashboard.html           # Glassmorphism production UI
β”œβ”€β”€ Dockerfile               # Container deployment config
β”œβ”€β”€ requirements.txt         # Python dependencies
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ visual_analyst.py    # Gemini 2.5 Flash vision agent
β”‚   β”œβ”€β”€ memory_agent.py      # Pinecone RAG + embedding agent
β”‚   └── writer_agent.py      # Llama 3.3 copywriting agent
└── .env                     # Environment variables (not tracked)
```

---

<div align="center">

**StyleSync AI** β€” Autonomous catalog intelligence for modern e-commerce.

</div>