Yashashvibhardwaj commited on
Commit
0a9fd6d
Β·
verified Β·
1 Parent(s): 253d7c7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +75 -6
README.md CHANGED
@@ -1,12 +1,81 @@
1
  ---
2
  title: Visual Product Matcher
3
- emoji: πŸ“š
4
- colorFrom: pink
5
  colorTo: pink
6
  sdk: docker
7
- pinned: false
8
- license: mit
9
- short_description: Backend to call
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: Visual Product Matcher
3
+ emoji: πŸ›οΈ
4
+ colorFrom: blue
5
  colorTo: pink
6
  sdk: docker
7
+ app_port: 7860
 
 
8
  ---
9
 
10
+ # πŸ›οΈ Visual Product Matcher – StyleSense
11
+
12
+ πŸš€ **Visual Product Matcher** is a FastAPI-based backend deployed on Hugging Face Spaces.
13
+ It uses **CLIP (ViT-B/32)** embeddings + **FAISS** to find visually similar products from a catalog.
14
+
15
+ ---
16
+
17
+ ## πŸ”‘ Endpoints
18
+
19
+ ### `GET /`
20
+ Health check – returns a status message.
21
+
22
+ **Example Response:**
23
+ ```json
24
+ {
25
+ "message": "πŸš€ Visual Product Matcher API is running!"
26
+ }
27
+ POST /search_text
28
+ Search products by text query.
29
+
30
+ Form Data Params:
31
+
32
+ query (str, required) β†’ Your search text
33
+
34
+ top_k (int, default=5) β†’ Number of results
35
+
36
+ min_score (float, default=0.0) β†’ Similarity threshold
37
+
38
+ Example:
39
+
40
+ bash
41
+ Copy code
42
+ curl -X POST https://Yashashvibhardwaj-Visual_product_matcher.hf.space/search_text \
43
+ -F "query=red sneakers" \
44
+ -F "top_k=5"
45
+ POST /match
46
+ Search products by image (upload or URL).
47
+
48
+ Form Data Params:
49
+
50
+ file (UploadFile, optional) β†’ Image file
51
+
52
+ image_url (str, optional) β†’ Image URL
53
+
54
+ top_k (int, default=5) β†’ Number of results
55
+
56
+ min_score (float, default=0.0) β†’ Similarity threshold
57
+
58
+ Example with URL:
59
+
60
+ bash
61
+ Copy code
62
+ curl -X POST https://Yashashvibhardwaj-Visual_product_matcher.hf.space/match \
63
+ -F "image_url=https://images.unsplash.com/photo-1542291026-7eec264c27ff" \
64
+ -F "top_k=5"
65
+ Example with file:
66
+
67
+ bash
68
+ Copy code
69
+ curl -X POST https://Yashashvibhardwaj-Visual_product_matcher.hf.space/match \
70
+ -F "file=@example.jpg" \
71
+ -F "top_k=5"
72
+ βš™οΈ Tech Stack
73
+ FastAPI – API framework
74
+
75
+ Sentence-Transformers (CLIP ViT-B/32) – for embeddings
76
+
77
+ FAISS – similarity search
78
+
79
+ Docker – containerized deployment
80
+
81
+ Hugging Face Spaces – hosting