Yashashvibhardwaj's picture
Update README.md
8bda539 verified
metadata
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:

{
  "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