Spaces:
Sleeping
Sleeping
Commit History
-
outfits: more slots, set-aware contrast, anchor-aware scandi, tighter rationale
- PAIRING_RULES: add outerwear to top/bottom anchors; add accessory to dress/outerwear/swimwear. Documents the order-matters rationale. - _OutfitState now tracks axes_covered (the set of axes the outfit has pushed past +/-0.3) and anchor_scandi. - _contrast_score rewards two paths: classic flips against running mean, AND extending to a fresh axis the outfit hasn't expressed. Fixes the late-pick dilution where mean-based contrast undervalued a 4th item bringing in a brand-new dimension. - Anchor-aware scandi floor: 0.85 for strongly-Scandi anchors (don't drag in non-Scandi picks), 0.5 for weakly-Scandi (don't reject Continental complements), 0.7 default in the middle band. - Rationale capped at ~3 bits; flip-axis takes priority over color harmony when both are present. - Outfit palette dedups near-identical colors (delta_e < 8) so two beige items show one chip with merged source list.35e2465 -
scrapers/base: retry image download once on failure
static.massimodutti.net rejects ~20% of bursty parallel requests with transient errors. A single 0.5s-delayed retry recovers most of them.1b285c4 -
massimodutti: drop products with no image URL at scrape time
3d2c012 -
add Massimo Dutti scraper
Inditex itxrest API behind Akamai. Playwright + playwright-stealth warms the cookie jar, then ctx.request.get() calls the JSON endpoints. ~30 product/category, 11 women categories, Norway market. - taste/scrapers/api/massimodutti.py (new): scraper, schema mapping - taste/scrapers/__init__.py: register - taste/config.py: add to default config - pyproject.toml: bump browser extra to include playwright-stealthc657278 -
categorize: stop matching standalone "kjoler" as dress
The dress rule used `kjole` as a substring to catch Norwegian compounds like midikjole/chiffonkjole, but it also matched `kjoler` — which Boozt and NA-KD use as a flat section header containing coats, jumpsuits, skirts, and other non-dresses. Replace with two precise patterns: \b\w*kjole\b — singular forms incl. standalone "kjole" \b\w+kjoler\b — compound plurals only (no standalone "kjoler") Re-categorized the cloned DB: 158 rows shift from dress to unknown. All 158 had category="kjoler" with no garment word in the (often truncated) product name, so unknown is the honest bucket. Outfit composer's PAIRING_RULES never request "unknown", so these stop appearing as wrong-bucket complements.930ed2b
-
expose palette + rationale on outfit endpoint
- ProductOut: surface scandi_score - PaletteSwatch: outfit-merged dominant LABs (source/lab/hex/name) - OutfitComplement: rationale, color_name, color_score, axes_added - OutfitResponse: anchor_color_name, palette, axes_covered/contrasted, scandi_score - DROP_FIELDS now strips internal lab_color/palette/contrast_axes blobs79979ec -
projection-head scaffold for type-aware similarity
- BucketPairHeads registry, identity-default when no .npz loaded - _pick_complement uses heads.similarity() instead of raw np.dot - Plug-in design: drop trained weights at ~/.taste/projection_heads.npz No training: Vasileva 2018 needs ~10K weak positives we don't have yet. Scaffold only — eval unchanged with identity fallback.6927844 -
set-aware multi-axis outfit composer
Replace anchor-similarity blend with 4-axis additive scoring: final = (α·score + β·sim + γ·color + δ·contrast) × scandi_bias - Color harmony via CIEDE2000 + neutral-pair floor - Bornstein 5-axis contrast scoring set-aware - Per-pick rationale ("color-harmonious · adds softness") - Outfit-level palette, axes_covered, axes_contrasted - Anchor-only sim centroid (running mean collapsed diversity) Evaluated on 80-anchor sample: scandi=0.75 (target 0.55) | axes=4.26 (target 2.5) | distinct=0.20 (target 0.18)9f6aaf9 -
add LAB color extraction, contrast axes, scandi scorer
- taste/colors.py: PIL → 128x128 → LAB → KMeans, CIEDE2000 distance - taste/contrast.py: Bornstein 5-axis tagger with rule patterns - taste/scandi.py: rule-based scandi-fit score from palette + metadata - store.py: lab_color/palette/contrast_axes/scandi_score columns + migration - scripts/backfill_color_contrast.py: idempotent backfill Foundation for set-aware outfit composition.83c6b69
-
anchor-condition outfit scoring
Cache image embedding per product (taste_embedding BLOB) and blend cos sim with the taste score in compose_outfit so the same shoes/bag stop appearing in every outfit. Eval (scripts/eval_outfit_diversity.py, 80 anchors x 3 slots = 240): before distinct_ratio = 0.054, mean anchor-sim = 0.69 after distinct_ratio = 0.214, mean anchor-sim = 0.740035f43
-
add Shop the look outfit composition
- taste/outfits.py: pairing rules per anchor bucket (dress→shoes+bag+outerwear, top→bottom+shoes+bag, etc.) picks top-scored in-stock complement per bucket, deduped by (brand, name) to avoid variant spam - GET /api/products/outfit?url= returns anchor + complements + total - frontend OutfitModal: hover "Shop the look" pill on each pairable card, opens a dark modal with the curated edit and run-totala9fc7b2
-
add canonical_category mapping for outfit composition
- taste/categorize.py: rule-based normalizer mapping raw store category + product name → {top, bottom, dress, outerwear, shoes, bag, accessory, intimates, swimwear, unknown} - handles 4 taxonomies (Boozt enums, COS paths, Norwegian/Swedish compounds like midikjole, håndveske, ryggsekk) - store: new canonical_category column, computed in upsert - 99.45% coverage on the live catalog (10,379 / 10,436)3ef384e -
add price/sale bias, multi-image, text fusion to scoring
- derive_user_metadata_profile: price band + sale_pref from rated products - multiplicative price_bias (floor 0.7) and sale_bias (±0.05) - encode_product fuses mean-pooled image embs with text at tw=0.3 - store: new image_paths column + get_user_profile_inputs helper - scrapers/base: download up to 3 images per productd7f92a4
-
fix COS image dict serialization and store upsert safety
COS primaryImage field returns {"src": url} dict, not a string. Extract .src before storing. Also make store._do_upsert defensive against non-string/non-list values for sizes and image_urls.16ad21f -
add 5 new store scrapers, category filtering, per-category taste scoring
Scrapers: Zalando (hydration data), COS (Centra/__NEXT_DATA__), & Other Stories (__NEXT_DATA__), Ellos (Nuxt 3 payload), Nelly (Voyado Elevate API). All use curl_cffi or httpx as needed. Expand all stores to full women's clothing categories (dresses, tops, jackets, trousers, skirts, knitwear, shoes, bags). Add category filter UI with multilingual pattern matching backend and pill bar in browse page. Implement per-category taste scoring: build separate centroids per category, score products against their own category's centroids, fall back to unified for unseen categories. Experimentally validated 1.3-2.3x better within-category discrimination.7dcb597 -
standardize data collection: new schema, rewrite scrapers, lifecycle tracking
Schema: added color, material, category, external_id, original_price, currency, on_sale, in_stock, sizes, first/last_seen_at, updated_at. Score is now nullable (NULL = unscored). Auto-migration from v1. Scrapers: all 4 rewritten for full field capture: - Boozt: 5 images, color, stock, sizes, sale pricing - Miinto: UUID external_id, category, sizes, sale detection - NA-KD: switched to CURRENT_PAGE extraction, fixed brand/price (was 0) - Wakakuu: fixed price extraction (was 0), color, stock, sizes Store: new sync() method — idempotent upsert + marks missing products as out-of-stock. Running twice produces same result. Frontend: sale badges, sold-out overlay, color display, original price with strikethrough.0fba372 -
handle disk I/O error during image_urls migration on FUSE mounts
d40f9ef -
deduplicate color variants + multi-image support
Products: group by (brand, name, store) using ROW_NUMBER window, pick highest-scoring variant. Reduces ~1766 duplicates to unique models. Multi-image: scrapers now collect all image URLs (Boozt media array, NA-KD image list, Miinto photos, Wakakuu imageUrls). Full stack: schema image_urls column, Product model, API, TypeScript types. UI: Discover card has tap-to-navigate image zones with dot indicators. Browse cards cycle images on hover with zone-based navigation.bf6e8ac
-
Add Docker/HF Spaces deployment and fix security issues
- Dockerfile: multi-stage build (bun frontend + Python backend), CPU-only torch, serves everything on port 7860 for HF Spaces - FastAPI serves built frontend via StaticFiles + SPA catchall - Security: remove server filesystem paths from API responses, sanitize filenames on upload/image serving, prevent path traversal - Add fastapi, uvicorn, python-multipart to pyproject.toml deps - Support TASTE_DATA_DIR env var for container data directory34727e8 -
Add web app: FastAPI backend + React/TS frontend
Backend (FastAPI): - /api/products — paginated, filterable, sortable product browsing - /api/ratings — CRUD for reference images (like/dislike/remove/upload) - /api/stats — dashboard stats - /api/scan — trigger scan with background polling - /api/images — serve reference images Frontend (React + TypeScript + Vite + Bun): - Browse page: product grid with store filters, search, sort, pagination - Profile page: manage reference images, upload, like/dislike/remove - Dashboard: stats cards, per-store table, scan trigger - Dark theme matching existing design language8d87873 -
Add profile management page
Interactive HTML page where users can view their reference images, toggle like/dislike, remove images, and see excluded brands. Generated via: taste profile page48f200e -
Refactor into configurable package structure
- Extract taste/ package with clean module boundaries: taste/config.py (YAML config + user profiles) taste/engine.py (merged v1+v2 FashionSigLIP engine) taste/store.py (ProductStore class, db_path from config) taste/models.py (shared Product dataclass) taste/scrapers/ (registry + per-store scraper classes) taste/pipeline.py (scan orchestrator) taste/output.py (HTML generation with dynamic store filters) - All store URLs, API keys, categories now in config.yaml - User preferences (liked images, disliked brands) in profiles - CLI entry point: taste scan/stats/profile - No more hardcoded paths or user-specific data in sourcef02ea7f