A Flask-based API that analyzes sentiment in Amazon product reviews using machine learning. It processes text data, applies TF-IDF vectorization, and uses a Logistic Regression model to classify reviews as positive, negative, or neutral.
- Preprocesses and cleans text data
- Uses TF-IDF vectorization for feature extraction
- Logistic Regression for sentiment classification
- Simple API endpoint for predictions
git clone https://github.com/nipungoel24/Amazon-Review-Sentiment-Analysis.git
cd Amazon-Review-Sentiment-Analysis
conda create -n amazonreview python=3.10
conda activate amazonreview
pip install -r requirements.txt
flask --app api.py run
Once the app starts, it will run on port 5000 by default:
http://localhost:5000
Method | Endpoint | Description |
---|---|---|
POST | /predict |
Accepts a review as input and returns its sentiment (positive/negative). |
- Implement deep learning models for better accuracy
- Deploy the API on cloud platforms
- Improve text preprocessing techniques
Feel free to fork the repo and open a pull request with your improvements!