All work
Sentiment versions compared
3
Review pages per product
10
Summary length
4 sentences

How it works

Flow diagram: product URL pasted into the React app, reviews scraped with Flask and BeautifulSoup, sentiment scored with VADER and BERT when unsure, summary written by OpenAI GPT-3.5, and a verdict of percent positive versus negative.
  1. A React front end, built with Vite, takes an Amazon product URL.
  2. A Flask API finds the product's ASIN and pulls up to 10 pages of reviews with requests and BeautifulSoup.
  3. Each review gets a sentiment score, and the app reports the share of positive and negative reviews.
  4. OpenAI's GPT-3.5 writes a four-sentence summary of recurring praise and complaints.

The key decision: a hybrid sentiment model

VADER, a fast rule-based scorer, labels clear-cut reviews. When its compound score is close to zero, a DistilBERT model fine-tuned on SST-2 decides instead. That keeps a transformer's nuance for ambiguous language without running it on every review.

How the model was chosen

Three working versions were compared side by side: TextBlob polarity, DistilBERT on its own, and VADER with BERT for ambiguous reviews. The app uses the hybrid. Earlier experiments trained classic models on the Amazon Reviews 2023 dataset from Hugging Face.