Skip to content

tylermlui/Clear-Cosmetics

Repository files navigation

Clear Cosmetics

Clear Cosmetics is a web application designed to bring transparency to shopping for makeup products. It helps users make more informed decisions by utilizing AI to analyze and compare products based on user queries.

Features

  • Uses AI-powered search to assist users in finding makeup products.
  • Provides personalized product recommendations and insights.
  • Allows users to ask questions about makeup products and get accurate, AI-driven responses.

Technology Stack

  • OpenAI API: Uses OpenAI's GPT-3.5 model to analyze and generate embeddings for user queries and makeup product data.
  • Chroma Database: Embeddings generated by the OpenAI API are stored and retrieved using the Chroma vector database.
  • Flask (Backend): The backend API is built using Flask, which handles requests and integrates with the AI model.
  • Next.js (Frontend): The user interface is built using Next.js, providing a modern and responsive web experience.

Installation and Setup

To run Clear Cosmetics locally, follow these steps:

Prerequisites

  • Python 3.8+
  • Node.js 14+
  • OpenAI API Key (You can obtain this from OpenAI)

Backend Setup (Flask)

  1. Clone the repository:

    git clone https://github.com/yourusername/clear-cosmetics.git
    cd clear-cosmetics/backend
  2. Set up a Python virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Set your OpenAI API key in an .env file:

    echo "OPENAI_API_KEY=your-openai-api-key" > .env
  5. Run the Flask server:

    flask run

The backend should now be running at http://localhost:5000.

Frontend Setup (Next.js)

  1. Navigate to the frontend directory:

    cd ../frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

The frontend will run at http://localhost:3000.

Usage

Once both the backend and frontend are running, you can visit the frontend in your browser (http://localhost:3000) and start interacting with the app.

Users can search for makeup products, ask questions about specific items, and get product recommendations based on their needs. The app uses AI embeddings to offer personalized and transparent insights into the products.

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository.
  2. Create a new feature branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m "Add new feature").
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

Acknowledgments

  • OpenAI for providing the GPT-3.5 API.
  • Chroma for vector database support.

This README provides clear installation instructions, a summary of the technologies used, and instructions for contributing to the project. Let me know if you need further adjustments!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published