Spaces:
Runtime error
Runtime error
Commit History
-
fix(ui): restore garment images and descriptions in Ask chat
- Load wardrobe on Ask tab open and await loadWardrobe() on init so garment lookups are ready before the first question. - Build garmentsById map for reliable O(1) lookup with zero-padded IDs (garment_1 -> garment_001). - Replace garment references before markdown parsing using placeholders, matching both [garment_XXX] and bare garment_XXX forms. - Show AI-generated description in inline chips (fallback: color + type). - Instruct the assistant to always use bracketed [garment_XXX] IDs. Co-authored-by: Cursor <cursoragent@cursor.com>74e743a -
fix(ui): add bounds to rectangle geometry so detected boxes render
Annotorious v3 rectangle geometry requires a bounds field (minX, minY, maxX, maxY) in addition to x/y/w/h — its spatial index relies on it, so annotations without bounds were stored but never drawn. Compute bounds from each detected box. Co-authored-by: Cursor <cursoragent@cursor.com>1aafe24 -
fix(ui): use Annotorious v3 internal annotation format for bounding boxes
initAnnotator was building annotations in W3C FragmentSelector format which Annotorious v3 does not recognise as a drawable shape, so auto-detected boxes were never rendered. - Use the internal format: target.selector.type = 'RECTANGLE' with geometry {x, y, w, h} as documented in the Annotorious v3 API. - Remove the invalid `drawingTool` init option; call setDrawingTool() after instantiation instead. - Defer annotator creation until the <img> has finished loading (el.complete check + 'load' event listener) so the SVG layer has correct dimensions. - analyzeBoxes: read geometry directly from target.selector.geometry instead of parsing a FragmentSelector regex. Co-authored-by: Cursor <cursoragent@cursor.com>ba65e78 -
feat(ui): manual garment crop with Annotorious bounding-box editor
Upload a photo → server auto-detects garments via YOLOS and returns bounding boxes → Annotorious v3.8.6 renders the image with the boxes pre-drawn → user adds/edits/deletes boxes → "Analyse N garments" crops each box server-side and runs the VLM on each crop. Backend (app.py): - Mount data/_uploads/ as /uploads (temp image store). - api_prepare_image: saves upload, runs detect_garments, returns token + image_url + detected boxes [{x,y,w,h}]. - api_analyze_boxes: validates token, crops each box via PIL, calls extract_from_crop_bytes per crop, adds to catalog, cleans up. Frontend (index.html): - Load @annotorious/annotorious@3.8.6 CSS + ESM (version pinned). - handleFile now calls /prepare_image then opens the editor. - initAnnotator: creates annotator, loads initial boxes as W3C FragmentSelector annotations, syncs box count on create/delete. - analyzeBoxes: reads annotations, maps to pixel coords, calls /analyze_boxes, refreshes wardrobe on success. - cancelEditor: destroys an…2d97bc2 -
refactor(ui): show garment detail in a side drawer
Convert the garment detail from a centred modal to a right-aligned full-height side panel that slides in. Full-width on mobile. Co-authored-by: Cursor <cursoragent@cursor.com>7235725 -
fix(ui): log dock, garment detail layout and image cache
- Restore `-> dict` return annotation on api_load_dataset so Gradio serialises each generator yield as an SSE data event (logs were silently dropped without it). - Move log console to a fixed bottom dock (.log-dock) with a header showing live progress, a minimise/expand toggle and a close button; dock is visible from any tab during dataset loading. - Redesign garment detail panel as a single column with object-fit:contain image (no more distorted/cropped previews) and a clean attribute list below. - Add _image_url() helper with ?v=<mtime> query param to bust browser cache when the same garment ID is reused after clearing the catalog. - Call loadWardrobe() after a successful photo upload so the new garment appears immediately without a manual refresh. Co-authored-by: Cursor <cursoragent@cursor.com>4f4b1b3 -
feat(ui): garment detail panel and real-time load logs
- Clicking a wardrobe card opens an overlay with the full garment attributes (type, color, material, pattern, season, formality) and the AI-generated natural-language description. - api_load_dataset converted from a blocking call to a streaming generator that yields progress per garment (count, log lines, preview URL). - loadDataset() in the frontend now uses gradioClient.submit() to iterate SSE events; a live log console (dark monospace) and a row of thumbnail previews update in real time as each garment is processed. - Wardrobe is refreshed automatically once loading completes. Co-authored-by: Cursor <cursoragent@cursor.com>ee5ec33
-
chore (ui): Use new ui
6778432