Skip to content

This project involves using machine learning to classify Amazon reviews as positive or negative. The dataset used is the Amazon Alexa Reviews dataset, and the code is available on GitHub. The model used is a LSTM neural network, and the accuracy achieved is around 90%.

Notifications You must be signed in to change notification settings

deathmukh/sentiment_analysis

Repository files navigation

Build + Deploy a Sentiment Analysis Model to classify Amazon Alexa Reviews into Positive & Negative

An end-to-end toolkit on building a sentiment prediction model with a Jupyer notebook and deploying model pickle on local machine using flask. Our use case here is review classification of Amazon Alexa customer feedbacks into positive and negative. Dataset source is here.

How the model works!

Steps to run on Windows

  • Prerequisites: Python 3.9 (ensure Python is added to PATH) + Git Client

  • Open GIT CMD >> navigate to working directory >> Clone this Github Repo

    git clone https://github.com/deathmukh/sentiment_analysis.git  
    
  • Open Windows Powershell >> navigate to new working directory (cloned repo folder)

  • Create a virtual environment

    • install virtual environment

      pip install virtualenv
      
    • create virtual environment by the name ENV

      virtualenv ENV
      
    • activate ENV

      .\ENV\Scripts\activate
      
  • Install project dependencies

    pip install -r .\requirements.txt
    
  • Run the project

    python app.py
    
  • Look for the local host address on Powershell screen, something like: 127.0.0.1:5000 >> Type it on your Web Browser >> Project shall load

  • Try out your Amazon Alexa test reviews and look for results

  • To close >> Go back to Powershell & type ctrl+c >> Deactivate Virtual Environment ENV

    deactivate
    

Steps to run on Mac

  • Prerequisites: Python 3.9

  • Open Terminal >> navigate to working directory >> Clone this Github Repo

    git clone https://github.com/deathmukh/sentiment_analysis.git  
    
  • Navigate to new working directory (cloned repo folder)

  • Create a virtual environment

    • install virtual environment

      pip install virtualenv
      
    • create virtual environment by the name ENV

      virtualenv ENV  
      
    • activate ENV

      source ENV/bin/activate
      
  • Install project dependencies

    pip install -r requirements.txt  
    
  • Run the project

    python app.py
    
  • Look for the local host address on Terminal screen, something like: 127.0.0.1:5000 >> Type it on your Web Browser >> Project shall load

  • Try out your Amazon Alexa test reviews and look for results

  • To close >> Go back to Terminal & type ctrl+c >> Deactivate Virtual Environment ENV

    deactivate
    

About

This project involves using machine learning to classify Amazon reviews as positive or negative. The dataset used is the Amazon Alexa Reviews dataset, and the code is available on GitHub. The model used is a LSTM neural network, and the accuracy achieved is around 90%.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published