Sentiment Analysis with PyTorch and Hugging Face IMDB Dataset

This project implements a sentiment analysis model using PyTorch and the IMDB dataset from the Hugging Face datasets library. The model uses an LSTM architecture to classify movie reviews as either positive or negative.

Features

  • Loads the IMDB dataset from the Hugging Face datasets library
  • Tokenizes the text data using the BERT tokenizer
  • Trains a sentiment analysis model using PyTorch and LSTM
  • Evaluates the model's performance on the test set
  • Provides a Flask API for sentiment prediction

Requirements

  • Python 3.7 or higher
  • PyTorch
  • Hugging Face Transformers
  • Hugging Face Datasets
  • Flask
  • Flask-CORS