2.5 KiB
2.5 KiB
Destination
A fast, single-user, locally hosted web app (app.py + vanilla HTML/CSS/JS in static/index.html) running on http://127.0.0.1:8000 where a user can upload a garment photo, choose presets or customize the prompt, submit to OpenRouter's meta/muse-image, view side-by-side before/after comparisons, and download the full-resolution restored image.
Notes
- Domain: Garment photo cleaning, wrinkle removal, catalog photography standardization.
- Skills:
prototype,unslop. - Notes override: Execution carried into the map tickets.
- Standing preferences: Minimal dependencies (FastAPI + uvicorn + vanilla HTML/CSS/JS without build steps or node_modules).
- Verified facts:
meta/muse-imageavoids false-positive moderation triggers, output capped ~1.8 MP requiring Pillow Lanczos upscale to source dimensions.
Decisions so far
- Decouple core photo cleaning logic for CLI and API reuse: Extracted encoding, OpenRouter API client, and in-memory Lanczos resolution restoration into
cleaner.py, supporting both raw bytes and paths for CLI and web API reuse. - Implement FastAPI backend and /api/clean endpoint in app.py: Built FastAPI service in
app.pyexposingPOST /api/cleanwith multipart upload, base64 data URI response, Lanczos toggle, and static file hosting. - Build single-page web UI in static/index.html: Created vanilla single-page UI in
static/index.htmlwith drag-and-drop upload, preset selectors, elapsed timer, side-by-side comparison, and clean image download. - End-to-end verification and documentation update: Added end-to-end integration test suite in
tests/test_e2e.pyand expandedREADME.mdcovering Web UI, CLI, architecture, and testing.
Not yet specified
- Batch upload or multi-image queue (if single-image workflow demands scaling)
Out of scope
- Multi-tenant authentication, user accounts, and remote multi-user session management
- Custom AI model fine-tuning or local GPU model inference
- Cloud storage integrations (AWS S3, Google Cloud Storage)