Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChromaMood: AI-Powered Color Palette Search

ChromaMood is a semantic search engine that allows users to find the perfect color palette based on emotions, vibes, and descriptions rather than just hex codes.

Instead of searching for "blue and green," you can search for "a lonely rainy night in a futuristic city" or "the feeling of eating a fresh lemon on a summer morning."


Features

  • Semantic Search: Uses Natural Language Processing (NLP) to understand the "vibe" of your query.
  • Vector Database: Powered by OpenSearch for high-performance k-NN (k-Nearest Neighbors) retrieval.
  • Lightweight AI: Uses the all-MiniLM-L6-v2 Sentence-Transformer model for local embedding generation (no API costs!).
  • Interactive UI: A sleek, user-friendly interface built with Streamlit.
  • JSON-Driven: Easy to expand by simply adding new palettes to a JSON file.

Tech Stack

  • Language: Python 3.9+
  • Search Engine: OpenSearch (Vector Database)
  • AI Model: Sentence-Transformers (Hugging Face)
  • Frontend: Streamlit
  • DevOps: Docker & Docker Compose

Project Structure

ChromaMood/
├── data/
│   └── palettes.json      # The source of truth for your 100+ vibes
├── src/
│   ├── app.py             # Streamlit UI
│   ├── indexer.py         # Data processing & OpenSearch
│   ├── search_engine.py   # Vector search logic
│   └── config.py          # Central configuration settings
├── docker-compose.yml     # OpenSearch setup
└── requirements.txt       # Python dependencies

⚡ Getting Started

Follow these steps to set up the project locally on your machine.

1. Clone the Repository

Open your terminal and run:

git clone [https://github.com/your-username/ChromaMood.git](https://github.com/your-username/ChromaMood.git)
cd ChromaMood

2. Start OpenSearch (Docker)

This project requires OpenSearch running as a vector database. Use the provided Docker Compose file to start it:

docker-compose up -d

Note: Wait about 20-30 seconds for the database to fully initialize before running the indexer.

3. Install Python Dependencies

It is highly recommended to use a virtual environment (venv):

# Create and activate venv
python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate

# Install required packages
pip install -r requirements.txt
pip install "huggingface_hub<0.25.0"

4. Index the Data

Run the indexer script to process your data/palettes.json and upload the embeddings to OpenSearch:

# On Windows
set PYTHONPATH=.
python src/indexer.py

# On Mac/Linux
export PYTHONPATH=.
python3 src/indexer.py

5. Launch the App

Start the Streamlit interface:

streamlit run src/app.py

About

ChromaMood is a semantic search engine that allows users to find the perfect color palette based on emotions, vibes, and descriptions rather than just hex codes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages