selinazarzour commited on
Commit
ae2440e
·
1 Parent(s): 1f8f1aa

updated the README file for clarity

Browse files
Files changed (1) hide show
  1. README.md +61 -52
README.md CHANGED
@@ -8,39 +8,38 @@ sdk_version: 5.42.0
8
  app_file: app.py
9
  pinned: false
10
  ---
11
- # AI Virtual Try-On & Fashion Advisor (Hugging Face Space)
12
-
13
- A portfolio-ready, full-stack AI fashion assistant and virtual try-on system. Combines computer vision, conversational AI, and web automation to deliver style advice, outfit analysis, and shopping recommendations—all in one interactive web app.
14
-
15
- ## Features
16
-
17
- ### 1. Try-On & Analysis
18
- - **Upload Clothing Image & Avatar Image:**
19
- - Upload two images: one of a clothing item and one of an avatar/person.
20
- - **AI Try-On Generation:**
21
- - Uses the [try-on-diffusion API](https://rapidapi.com/hlbq/api/try-on-diffusion/) to generate a virtual try-on result.
22
- - **BLIP/CLIP AI Analysis:**
23
- - Automatically analyzes the generated try-on image using BLIP for captioning and fashion prompts.
24
- - **LLM Fashion Advice:**
25
- - Provides detailed, context-aware fashion advice using TinyLlama LLM, based on the AI analysis.
26
- - **All results (image, analysis, advice) are displayed together.**
27
-
28
- ### 2. Chatbot (TinyLlama LLM)
29
- - **Fashion Chatbot:**
30
- - Chat with an AI stylist powered by TinyLlama.
31
- - The chatbot always has context from your latest try-on and analysis, so you can ask about "this outfit" or "these colors" and get relevant answers.
32
-
33
- ### 3. Find Similar
34
- - **Upload any try-on or fashion image.**
35
- - **Get recommendations for similar outfits, complementary accessories, and alternative colors.**
36
- - **Suggested stores are included in the recommendations.**
37
-
38
- ## 🚀 Features
39
- - **Virtual Try-On:** Upload clothing and avatar images to generate realistic try-on results.
40
- - **AI Fashion Analysis:** Get style advice and outfit analysis using BLIP and CLIP models.
41
- - **Conversational Assistant:** Chat with a TinyLlama-powered AI for personalized fashion tips.
42
- - **Automated Shopping:** Find similar items and compare prices across e-commerce sites using Playwright automation.
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
- - All AI models (BLIP, CLIP, TinyLlama) are loaded and run in the backend.
53
- - The try-on image is generated via an external API (RapidAPI key required).
54
- - The app is organized into tabs for a clean, modern user experience.
 
55
 
56
  ## Requirements
57
  - Python 3.8+
58
- - `gradio`, `transformers`, `torch`, `Pillow`, `requests`
59
- - A valid RapidAPI key for try-on-diffusion (replace in `app.py` if needed)
60
 
61
- ## Usage
 
62
  1. **Clone this repo and open in Hugging Face Spaces or run locally.**
63
  2. **Install requirements:**
64
- ```bash
65
- pip install -r requirements.txt
66
- ```
67
  3. **Run the app:**
68
- ```bash
69
- python app.py
70
- ```
71
  4. **Use the web UI:**
72
- - Try-On & Analysis: Upload images, generate try-on, get analysis/advice.
73
- - Chatbot: Ask fashion questions with context.
74
- - Find Similar: Get recommendations for similar outfits.
 
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: [Salesforce BLIP](https://huggingface.co/Salesforce/blip-image-captioning-base)
83
- - CLIP: [OpenAI CLIP](https://huggingface.co/openai/clip-vit-base-patch32)
84
- - LLM: [TinyLlama](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
85
- - Try-On API: [try-on-diffusion](https://rapidapi.com/hlbq/api/try-on-diffusion/)
 
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