/example-retail-feedback-analysis-tool

Example project to explain a practical way to use a multimodal LLM for a business purpose.

Primary LanguagePython

Retail Feedback Analysis

Setup

  1. Clone the repository:

    git clone git@github.com:stephenc222/example-retail-feedback-analysis-tool.git
    cd example-retail-feedback-analysis-tool
  2. Create a virtual environment:

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

    pip install -r requirements.txt
  4. Set up environment variables:

    • Create a .env file in the root directory of the project.
    • Copy the contents of .env.example into .env and fill in your Google API key.
    • Need to setup a Google GenAI billing account
  5. Generate a report:

    sh generate_report.sh
  6. Build the client:

    sh build_client.sh
  7. Start the Flask app:

    sh start_server.sh

After the Flask app is running, you can access the client at http://localhost:5000.

Dependencies

  • Python 3.8+
  • google-generativeai
  • dotenv
  • ffmpeg-python
  • librosa
  • noisereduce
  • numpy
  • soundfile
  • pydub
  • spacy
  • opencv-python
  • Pillow

Additional Setup

  • Install ffmpeg if not already installed:

    pip install ffmpeg-python

Error Handling

Custom exceptions are used throughout the codebase to handle specific errors in data ingestion, preprocessing, analysis, integration, and reporting steps.