An AI fashion assistant that turns user style preferences into original clothing patterns and fashion sketches. Visuals are generated with Arrexel/pattern-diffusion. The system exposes an API (FastAPI) and a lightweight UI (Streamlit).
- User preferences: colors, patterns, garment types, occasions, trends, optional reference images
- Image generation: unique patterns and fashion sketches with variations
- Iteration: refine results with feedback and maintain session context
- API-first design, modular model adapters, and simple UI for quick testing
Here are some examples of fashion designs generated by the AI model:
Example 1: Fashion design with unique pattern and style
Example 2: Fashion design showcasing different color combinations
Example 3: Fashion design demonstrating pattern variations
- Python 3.10+
- A Hugging Face token with Inference API access
# From the project root
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Copy and edit environment
cp .env.example .env
# Then edit .env with your Hugging Face token and optional overridesuvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadOpen: http://localhost:8000/docs
streamlit run ui/app.pyThe UI will point to the API defined in your .env.
Set these in .env:
HF_TOKEN: Your Hugging Face token (required)IMAGE_MODEL_ID: Defaults toArrexel/pattern-diffusionAPI_HOST: Defaults tohttp://localhost:8000API_PORT: Defaults to8000UI_API_BASE: UI API base URL; defaults tohttp://localhost:8000
app/main.py: FastAPI app and endpointsapp/schemas/*: Pydantic request/response modelsapp/services/*: Prompt builder and session management (SQLite)app/models/*: Model adapters for image generation and text advice (Hugging Face Inference API)ui/app.py: Streamlit client for interactive exploration
- The code uses the Hugging Face Inference API for image generation to avoid heavy local GPU requirements. Swap adapters if you prefer running models locally (Diffusers).
- The session store is a simple SQLite DB located at
data/app.db. - Image responses are Base64-encoded in JSON; the UI decodes and displays them.