jayeshthk/SentimentSeer-LSTM — reverse-engineered prompt

Reverse engineered prompt

Build me a simple sentiment analysis project in a Jupyter notebook that can learn from movie reviews and tell whether a review is positive or negative. I want the notebook to show the full flow clearly, from loading the text data, cleaning it by lowercasing and removing punctuation, turning words into tokens, padding the sequences, then training an LSTM model in PyTorch and evaluating it on validation and test data.

Please keep it easy to follow and runnable end to end, with comments that explain what each section is doing. Include the usual pieces like embeddings, an LSTM layer, dropout, a final output layer, binary loss, and accuracy reporting. Show the training progress and final test results in a readable way.

I also want an inference section at the end where I can paste a new review and get back the predicted sentiment and confidence. If it helps, you can also support loading the pretrained model from Hugging Face instead of training from scratch. Look up current docs online if you need to.

Want more depth? Deep Reverse