color.palette.gen.preview.MOV
This is a Flask web application that generates color palettes based on text prompts. It utilizes the OpenAI GPT-3.5 model to convert verbal descriptions into lists of colors.
Make sure you have the following installed:
- Python 3
- Flask
- OpenAI Python library
python-dotenv
library
- Clone the repository to your local machine.
- Create a virtual environment (optional but recommended).
- Create the
.env
file and provide your OpenAI API key.
- Run the Flask application by executing the following command:
python app.py
- Access the application by opening a web browser and navigating to
http://localhost:5000
. - Enter a text prompt describing the desired color palette.
- Click the "Generate" button.
- The application will send the text prompt to the OpenAI model, which will generate a list of colors.
- The generated color palette will be displayed on the web page.
Here are a few examples of text prompts you can try:
- "Convert the following verbal description of a color palette into a list of colors: The Mediterranean Sea"
- "Convert the following verbal description of a color palette into a list of colors: sage, nature, earth"
- "Convert the following verbal description of a color palette into a list of colors: [your text prompt here]"
- The color palettes generated will contain between 2 and 8 colors.
- The application uses the
text-davinci-003
model from OpenAI to generate the color palettes. You can change the model if desired. - The generated color palettes are returned in JSON format as an array of hexadecimal color codes.
Feel free to modify and enhance the application according to your needs!