Spaces:
Runtime error
Runtime error
Commit
·
ae2440e
1
Parent(s):
1f8f1aa
updated the README file for clarity
Browse files
README.md
CHANGED
|
@@ -8,39 +8,38 @@ sdk_version: 5.42.0
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
-
|
| 23 |
-
|
| 24 |
-
- **
|
| 25 |
-
|
| 26 |
-
- **
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
### 3. Find Similar
|
| 34 |
-
- **Upload any
|
| 35 |
-
- **
|
| 36 |
-
- **
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
- **
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
- **Modern UI:** Gradio-powered web interface for easy interaction.
|
| 44 |
|
| 45 |
## 🏗️ Architecture
|
| 46 |
- **Frontend:** Gradio (for Hugging Face Spaces)
|
|
@@ -48,41 +47,51 @@ A portfolio-ready, full-stack AI fashion assistant and virtual try-on system. Co
|
|
| 48 |
- **AI Models:** BLIP, CLIP, TinyLlama (all open-source, loaded on demand)
|
| 49 |
- **Automation:** Playwright for web scraping and product search
|
| 50 |
|
|
|
|
| 51 |
## How It Works
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
| 55 |
|
| 56 |
## Requirements
|
| 57 |
- Python 3.8+
|
| 58 |
-
-
|
| 59 |
-
- A valid RapidAPI key for try-on-diffusion (
|
| 60 |
|
| 61 |
-
|
|
|
|
| 62 |
1. **Clone this repo and open in Hugging Face Spaces or run locally.**
|
| 63 |
2. **Install requirements:**
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
3. **Run the app:**
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
4. **Use the web UI:**
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
| 75 |
|
| 76 |
## 🛠️ Setup & Deployment
|
| 77 |
1. All dependencies are listed in `requirements.txt`.
|
| 78 |
2. The backend Flask server is started automatically by `app.py`.
|
| 79 |
3. The Gradio interface is the entry point for Hugging Face Spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
## Credits
|
| 82 |
-
- BLIP
|
| 83 |
-
- CLIP
|
| 84 |
-
- LLM
|
| 85 |
-
- Try-On API
|
|
|
|
| 86 |
|
| 87 |
## License
|
| 88 |
MIT
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# AI Virtual Try-On & Fashion Advisor
|
| 13 |
+
|
| 14 |
+
🌍 An all-in-one, AI fashion assistant and virtual try-on system. This interactive web app combines computer vision, conversational AI, and web automation to deliver:
|
| 15 |
+
- Realistic virtual try-on results
|
| 16 |
+
- Automated outfit analysis and style advice
|
| 17 |
+
- Personalized fashion chatbot
|
| 18 |
+
- Similar item search and automated shopping
|
| 19 |
+
|
| 20 |
+
## 🛍️ Features
|
| 21 |
+
|
| 22 |
+
### 1. Virtual Try-On & Outfit Analysis
|
| 23 |
+
- **Upload Clothing & Avatar Images:** Upload a clothing item and an avatar/person image.
|
| 24 |
+
- **AI Try-On Generation:** Generates a virtual try-on using the [try-on-diffusion API](https://rapidapi.com/hlbq/api/try-on-diffusion/).
|
| 25 |
+
- **BLIP/CLIP Analysis:** Automatically analyzes the try-on result with BLIP (captioning) and CLIP (fashion prompts).
|
| 26 |
+
- **LLM Fashion Advice:** TinyLlama LLM provides detailed, context-aware fashion advice based on the analysis.
|
| 27 |
+
- **Unified Results:** See the generated try-on image, AI analysis, and advice together in one place.
|
| 28 |
+
|
| 29 |
+
### 2. Fashion Chatbot
|
| 30 |
+
- **Conversational AI Stylist:** Chat with a TinyLlama-powered stylist for personalized fashion tips.
|
| 31 |
+
- **Context-Aware:** The chatbot uses your latest try-on and analysis for relevant, tailored answers.
|
| 32 |
+
|
| 33 |
+
### 3. Find Similar & Shopping Automation
|
| 34 |
+
- **Similar Outfit Search:** Upload any fashion image to get recommendations for similar outfits, accessories, and alternative colors.
|
| 35 |
+
- **Store Suggestions:** Recommendations include suggested stores and links.
|
| 36 |
+
- **Automated Shopping:** Uses Playwright automation to search and compare prices across e-commerce sites.
|
| 37 |
+
|
| 38 |
+
### 4. Modern, User-Friendly UI
|
| 39 |
+
- **Tabbed Gradio Interface:** Clean, modern layout for easy navigation between try-on, chatbot, and similar item search.
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
|
|
|
| 43 |
|
| 44 |
## 🏗️ Architecture
|
| 45 |
- **Frontend:** Gradio (for Hugging Face Spaces)
|
|
|
|
| 47 |
- **AI Models:** BLIP, CLIP, TinyLlama (all open-source, loaded on demand)
|
| 48 |
- **Automation:** Playwright for web scraping and product search
|
| 49 |
|
| 50 |
+
|
| 51 |
## How It Works
|
| 52 |
+
1. All AI models (BLIP, CLIP, TinyLlama) are loaded and run in the backend.
|
| 53 |
+
2. Try-on images are generated via the external try-on-diffusion API (RapidAPI key required).
|
| 54 |
+
3. The app is organized into tabs for a seamless user experience.
|
| 55 |
+
|
| 56 |
|
| 57 |
## Requirements
|
| 58 |
- Python 3.8+
|
| 59 |
+
- All dependencies listed in `requirements.txt`
|
| 60 |
+
- A valid RapidAPI key for try-on-diffusion (set in `app.py`)
|
| 61 |
|
| 62 |
+
|
| 63 |
+
## 🚦 Usage
|
| 64 |
1. **Clone this repo and open in Hugging Face Spaces or run locally.**
|
| 65 |
2. **Install requirements:**
|
| 66 |
+
```bash
|
| 67 |
+
pip install -r requirements.txt
|
| 68 |
+
```
|
| 69 |
3. **Run the app:**
|
| 70 |
+
```bash
|
| 71 |
+
python app.py
|
| 72 |
+
```
|
| 73 |
4. **Use the web UI:**
|
| 74 |
+
- Try-On & Analysis: Upload images, generate try-on, get analysis and advice.
|
| 75 |
+
- Chatbot: Ask fashion questions with context.
|
| 76 |
+
- Find Similar: Get recommendations for similar outfits and shopping links.
|
| 77 |
+
|
| 78 |
|
| 79 |
## 🛠️ Setup & Deployment
|
| 80 |
1. All dependencies are listed in `requirements.txt`.
|
| 81 |
2. The backend Flask server is started automatically by `app.py`.
|
| 82 |
3. The Gradio interface is the entry point for Hugging Face Spaces.
|
| 83 |
+
4. For Playwright automation, ensure a `postBuild` file exists with:
|
| 84 |
+
```bash
|
| 85 |
+
playwright install chromium
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
|
| 89 |
## Credits
|
| 90 |
+
- **BLIP:** [Salesforce BLIP](https://huggingface.co/Salesforce/blip-image-captioning-base)
|
| 91 |
+
- **CLIP:** [OpenAI CLIP](https://huggingface.co/openai/clip-vit-base-patch32)
|
| 92 |
+
- **LLM:** [TinyLlama](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
|
| 93 |
+
- **Try-On API:** [try-on-diffusion](https://rapidapi.com/hlbq/api/try-on-diffusion/)
|
| 94 |
+
|
| 95 |
|
| 96 |
## License
|
| 97 |
MIT
|