Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
6.0.2
metadata
title: Ai Virtual Tryon
emoji: π
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.42.0
app_file: app.py
pinned: false
AI Virtual Try-On & Fashion Advisor
π 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:
- Realistic virtual try-on results
- Automated outfit analysis and style advice
- Personalized fashion chatbot
- Similar item search and automated shopping
ποΈ Features
1. Virtual Try-On & Outfit Analysis
- Upload Clothing & Avatar Images: Upload a clothing item and an avatar/person image.
- AI Try-On Generation: Generates a virtual try-on using the try-on-diffusion API.
- BLIP/CLIP Analysis: Automatically analyzes the try-on result with BLIP (captioning) and CLIP (fashion prompts).
- LLM Fashion Advice: TinyLlama LLM provides detailed, context-aware fashion advice based on the analysis.
- Unified Results: See the generated try-on image, AI analysis, and advice together in one place.
2. Fashion Chatbot
- Conversational AI Stylist: Chat with a TinyLlama-powered stylist for personalized fashion tips.
- Context-Aware: The chatbot uses your latest try-on and analysis for relevant, tailored answers.
3. Find Similar & Shopping Automation
- Similar Outfit Search: Upload any fashion image to get recommendations for similar outfits, accessories, and alternative colors.
- Store Suggestions: Recommendations include suggested stores and links.
- Automated Shopping: Uses Playwright automation to search and compare prices across e-commerce sites.
4. Modern, User-Friendly UI
- Tabbed Gradio Interface: Clean, modern layout for easy navigation between try-on, chatbot, and similar item search.
ποΈ Architecture
- Frontend: Gradio (for Hugging Face Spaces)
- Backend: Flask API server (runs in background)
- AI Models: BLIP, CLIP, TinyLlama (all open-source, loaded on demand)
- Automation: Playwright for web scraping and product search
How It Works
- All AI models (BLIP, CLIP, TinyLlama) are loaded and run in the backend.
- Try-on images are generated via the external try-on-diffusion API (RapidAPI key required).
- The app is organized into tabs for a seamless user experience.
Requirements
- Python 3.8+
- All dependencies listed in
requirements.txt - A valid RapidAPI key for try-on-diffusion (set in
app.py)
π¦ Usage
- Clone this repo and open in Hugging Face Spaces or run locally.
- Install requirements:
pip install -r requirements.txt - Run the app:
python app.py - Use the web UI:
- Try-On & Analysis: Upload images, generate try-on, get analysis and advice.
- Chatbot: Ask fashion questions with context.
- Find Similar: Get recommendations for similar outfits and shopping links.
π οΈ Setup & Deployment
- All dependencies are listed in
requirements.txt. - The backend Flask server is started automatically by
app.py. - The Gradio interface is the entry point for Hugging Face Spaces.
- For Playwright automation, ensure a
postBuildfile exists with:playwright install chromium
Credits
- BLIP: Salesforce BLIP
- CLIP: OpenAI CLIP
- LLM: TinyLlama
- Try-On API: try-on-diffusion
License
MIT