--- title: Visual Product Matcher emoji: 🛍️ colorFrom: blue colorTo: pink sdk: docker app_port: 7860 --- # 🛍️ Visual Product Matcher – StyleSense 🚀 **Visual Product Matcher** is a FastAPI-based backend deployed on Hugging Face Spaces. It uses **CLIP (ViT-B/32)** embeddings + **FAISS** to find visually similar products from a catalog. --- ## 🔑 Endpoints ### `GET /` Health check – returns a status message. **Example Response:** ```json { "message": "🚀 Visual Product Matcher API is running!" } POST /search_text Search products by text query. Form Data Params: query (str, required) → Your search text top_k (int, default=5) → Number of results min_score (float, default=0.0) → Similarity threshold Example: bash Copy code curl -X POST https://Yashashvibhardwaj-Visual_product_matcher.hf.space/search_text \ -F "query=red sneakers" \ -F "top_k=5" POST /match Search products by image (upload or URL). Form Data Params: file (UploadFile, optional) → Image file image_url (str, optional) → Image URL top_k (int, default=5) → Number of results min_score (float, default=0.0) → Similarity threshold Example with URL: bash Copy code curl -X POST https://Yashashvibhardwaj-Visual_product_matcher.hf.space/match \ -F "image_url=https://images.unsplash.com/photo-1542291026-7eec264c27ff" \ -F "top_k=5" Example with file: bash Copy code curl -X POST https://Yashashvibhardwaj-Visual_product_matcher.hf.space/match \ -F "file=@example.jpg" \ -F "top_k=5" ⚙️ Tech Stack FastAPI – API framework Sentence-Transformers (CLIP ViT-B/32) – embeddings FAISS – similarity search Docker – containerized deployment Hugging Face Spaces – hosting