Leverages Watsonx.ai, specifically the IBM Granite model, to analyze and summarize customer reviews, providing city planners and administrators with actionable insights.
- Python 3.7 or higher
- Node.js 14.x or higher
- npm 6.x or higher
- IBM Watsonx.ai credentials
-
Clone the repository:
git clone https://github.com/jobint001/IBM-Watsonx.ai-challenge.git cd IBM-Watsonx.ai-challenge/backend
-
Create a virtual environment and activate it:
python -m venv ibm source ibm/Scripts/activate (Windows) source ibm/bin/activate (MacOS/Linux)
-
Install the required packages:
pip install -r requirements.txt
-
Navigate to the frontend directory:
cd ../frontend/urban-forum
-
Install the required packages:
npm install
- Create a
.env
file in thebackend
directory with the necessary environment variables. For example:API_KEY=your_watsonx_api_key PROJECT_ID=your_project_id
- Update the configuration in the
vite.config.js
file if necessary.
-
Navigate to the backend from root directory:
cd backend
-
Activate the virtual environment (if not already activated):
source ibm/Scripts/activate (Windows) source ibm/bin/activate (MacOS/Linux)
-
Run the backend server:
python run.py
-
Navigate to the frontend from root directory:
cd frontend/urban-forum
-
Run the frontend development server:
npm run dev
-
Prepare your
dataset.csv
file with the necessary data. -
The Flask backend processes the
dataset.csv
file and returns a summary. -
The frontend displays the summary returned by the backend.
- 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
andpackage.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.