Sentiment Analysis — with attention visualization

A bidirectional LSTM with Bahdanau-style attention trained on IMDB movie reviews (English). The demo doesn't only predict positive vs negative: it shows which words the network actually attended to when making the decision.

Attention weights are extracted from the trained model and rendered as a per-token heatmap. Darker = higher attention.

Heads-up on calibration: trained on IMDB binary sentiment (positive / negative), the model tends to be very confident at the extremes. Truly neutral or mixed text often gets pushed toward one of the poles with high probability — read the confidence as "the model leans this way," not as "this is exactly 99% positive."

Scope: English only — text in other languages will be tokenized but the attention weights won't be meaningful.

Source on GitHub

Or pick a sample