Spaces:
Sleeping
Sleeping
Gaurav vashistha
commited on
Commit
Β·
0f2d1cb
1
Parent(s):
94c6874
docs: Fix Gemini API key variable name
Browse files
README.md
CHANGED
|
@@ -7,26 +7,67 @@ sdk: docker
|
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
-
# MerchFlow AI
|
| 11 |
|
| 12 |

|
| 13 |

|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
MerchFlow AI is a **Multi-Agent System built in Pure Python (No LangChain)** that automates product listing generation using Enterprise-Grade Computer Vision. It leverages advanced visual analysis to streamline e-commerce workflows.
|
| 17 |
|
| 18 |
-
## Architecture
|
| 19 |
-
The system operates through a coordinated pipeline:
|
| 20 |
-
1. **Input Image** β Raw processing
|
| 21 |
-
2. **Visual Analyst (Gemini 1.5)** β Extracts visual features and metadata
|
| 22 |
-
3. **Manager Agent** β Orchestrates data flow and decision making
|
| 23 |
-
4. **n8n Webhook (Self-Hosted)** β Triggers downstream automation and integration
|
| 24 |
|
| 25 |
-
|
| 26 |
-
This project is open source under the MIT License. Feel free to fork and contribute.
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# MerchFlow AI
|
| 11 |
|
| 12 |

|
| 13 |

|
| 14 |
+

|
| 15 |
+

|
| 16 |
|
| 17 |
+
MerchFlow AI is a high-performance, multi-agent orchestration system designed to automate the generation of premium e-commerce product listings. By synergizing Computer Vision, Retrieval Augmented Generation (RAG), and Large Language Models (LLMs), it transforms raw product images into SEO-optimized market-ready content.
|
|
|
|
| 18 |
|
| 19 |
+
## ποΈ Architecture Flow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
The system employs a sophisticated event-driven architecture orchestrated by **FastAPI**:
|
|
|
|
| 22 |
|
| 23 |
+
1. **ποΈ Visual Agent (Gemini 1.5)**
|
| 24 |
+
* **Function**: Zero-shot image analysis.
|
| 25 |
+
* **Process**: Extracts high-fidelity visual attributes including dominant color palettes, stylistic classifications, and granular item types.
|
| 26 |
+
* **Engine**: Google Gemini 1.5 Flash (Vision).
|
| 27 |
|
| 28 |
+
2. **π§ Memory Agent (Pinecone)**
|
| 29 |
+
* **Function**: Semantic Search & RAG.
|
| 30 |
+
* **Process**: Vectorizes visual tags to query a high-dimensional index, retrieving historically high-performing SEO keywords and market trends relevant to the product.
|
| 31 |
+
* **Engine**: Pinecone Vector Database.
|
| 32 |
+
|
| 33 |
+
3. **βοΈ Writer Agent (Llama 3)**
|
| 34 |
+
* **Function**: Creative Synthesis.
|
| 35 |
+
* **Process**: Fuses visual data with retrieved market intelligence to generate persuasive, conversion-focused title, description, and feature bullets.
|
| 36 |
+
* **Engine**: Meta Llama 3 (via Groq Cloud).
|
| 37 |
+
|
| 38 |
+
4. **βοΈ Orchestrator (FastAPI)**
|
| 39 |
+
* **Function**: Async Pipeline Management.
|
| 40 |
+
* **Process**: Handles non-blocking agent execution, error propagation, and API lifecycle management.
|
| 41 |
+
|
| 42 |
+
5. **π Post-Processing (n8n)**
|
| 43 |
+
* **Function**: Automation Webhook.
|
| 44 |
+
* **Process**: Triggers downstream workflows (database storage, Shopify API integration) via secure webhooks upon successful generation.
|
| 45 |
+
|
| 46 |
+
## π Complete Setup
|
| 47 |
+
|
| 48 |
+
To run this system locally, ensure you have the following environment variables configured in your `.env` file:
|
| 49 |
+
|
| 50 |
+
```env
|
| 51 |
+
GEMINI_API_KEY=your_gemini_key
|
| 52 |
+
GROQ_API_KEY=your_groq_key
|
| 53 |
+
PINECONE_API_KEY=your_pinecone_key
|
| 54 |
+
N8N_WEBHOOK_URL=your_n8n_webhook_url
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## β‘ Quick Start
|
| 58 |
+
|
| 59 |
+
### 1. Installation
|
| 60 |
+
Install the required dependencies using pip:
|
| 61 |
+
|
| 62 |
+
```bash
|
| 63 |
+
pip install -r requirements.txt
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
### 2. Execution
|
| 67 |
+
Launch the FastAPI server:
|
| 68 |
+
|
| 69 |
+
```bash
|
| 70 |
+
python main.py
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
The API will be available at `http://localhost:7860`.
|