Skip to content

Leverages Watsonx.ai, specifically the IBM Granite model, to analyze and summarize customer reviews, providing city planners and administrators with actionable insights.

Notifications You must be signed in to change notification settings

jobint001/IBM-Watsonx.ai-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IBM-Watsonx.ai-challenge

Introduction

Leverages Watsonx.ai, specifically the IBM Granite model, to analyze and summarize customer reviews, providing city planners and administrators with actionable insights.

Prerequisites

  • Python 3.7 or higher
  • Node.js 14.x or higher
  • npm 6.x or higher
  • IBM Watsonx.ai credentials

Installation

Backend

  1. Clone the repository:

    git clone https://github.com/jobint001/IBM-Watsonx.ai-challenge.git
    cd IBM-Watsonx.ai-challenge/backend
  2. Create a virtual environment and activate it:

    python -m venv ibm
    source ibm/Scripts/activate (Windows)
    source ibm/bin/activate (MacOS/Linux)
  3. Install the required packages:

    pip install -r requirements.txt

Frontend

  1. Navigate to the frontend directory:

    cd ../frontend/urban-forum
  2. Install the required packages:

    npm install

Configuration

Backend

  • Create a .env file in the backend directory with the necessary environment variables. For example:
    API_KEY=your_watsonx_api_key
    PROJECT_ID=your_project_id
    

Frontend

  • Update the configuration in the vite.config.js file if necessary.

Running the Code

Backend

  1. Navigate to the backend from root directory:

    cd backend
  2. Activate the virtual environment (if not already activated):

    source ibm/Scripts/activate (Windows)
    source ibm/bin/activate (MacOS/Linux)
  3. Run the backend server:

    python run.py

Frontend

  1. Navigate to the frontend from root directory:

    cd  frontend/urban-forum
  2. Run the frontend development server:

    npm run dev

Usage

  1. Prepare your dataset.csv file with the necessary data.

  2. The Flask backend processes the dataset.csv file and returns a summary.

  3. The frontend displays the summary returned by the backend.

Troubleshooting

  • Virtual Environment Issues: Ensure that the virtual environment is properly activated before running backend commands.
  • Package Installation Errors: Ensure that you have the correct versions of Python, Node.js, and npm installed. Check the requirements.txt and package.json for specific version requirements.
  • Environment Variables: Make sure all necessary environment variables are correctly set in the .env file.
  • Server Issues: Check the terminal output for any error messages when starting the backend or frontend servers. Ensure that the servers are running on the specified ports.

About

Leverages Watsonx.ai, specifically the IBM Granite model, to analyze and summarize customer reviews, providing city planners and administrators with actionable insights.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published