Amazon Fine Food Sentiment Analysis with BERT

This repository contains code for a sentiment analysis demo that predicts the sentiment of Amazon fine food reviews using a finetuned BERT Base model from the Hugging Face Transformers library. The demo also includes an interface built using Gradio, allowing users to interactively input reviews and receive sentiment predictions.

About the Demo

The sentiment analysis model is trained on the Amazon Fine Food Reviews dataset, which includes:

Model Architecture

Model Architecture:

Files in the Repository:

Usage:

To run the code and interact with the sentiment analysis demo:

  1. Open amazon_finefood_sentiment_analysis_interface.ipynb.
  2. Set the file path to sentiment_analysis_finetune_bert.pkl.
  3. Execute the notebook cells to set up the Gradio interface and make predictions.

Feel free to experiment with the interface, input different reviews, and observe sentiment predictions and confidence scores.

For questions/issues, open an issue in this repository.

Model Achievements

Training Details

All experiments were performed on a single NVIDIA RTX 2070 GPU. The training times are as follows:

Acknowledgments:

The sentiment analysis model uses BERT architecture from Hugging Face Transformers. The Amazon Fine Food Reviews dataset is for training. Gradio is used for the interactive interface.