Skip to content

nirav8403/Sentiment-Analysis-Web-App-Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentiment Analysis Web App Deployment

In this project, a simple web app is deployed using Amazon SageMaker and PyTorch using the IBDM Dataset. The web app interacts with a deployed recurrent neural network performing sentiment analysis on movie reviews.

Table of Contents

  1. Installation
  2. Introduction
  3. File Descriptions
  4. Results
  5. Licensing, Authors, and Acknowledgements

Installation

  1. Python versions 3.6
  2. Library and packages: pytorch 0.4, sagemaker 1.72.0, os, glob, numpy, pandas, matplotlib, sklearn, pickle

Introduction

In this project, I deployed a sentiment analysis Web App through Amazon SageMaker and Pytorch using the IMDB Dataset. I first trained the model using LSTM model with hidden dimension set to 200 and epochs 10. The I deployed the model using Pytorch, with four functions model_fn, input_fn, output_fn, and predict_fn. To sensure the model working well, I tested the deployed model and the accuracy score is 0.87. After ensure the model is accurate, I then deployed the model to a web app following: (1) create IAM role for Lambda function; (2) create a Lambda function; (3) set up API Gateway using POST method. Finnaly, I tried out the Web App using random reviews from rotten tomato, and the Web App seems to work pretty well.

File Descriptions

Folders:

  • images: contains the images used in the SageMaker Project notebook
  • serve: contains the model and train function when using pytorch to deploy a model
  • train: contains the model and train functions when using sagemaker to deploy a model
  • website: contains the index.html for the web app

Files:

  • SageMaker Project.ipynb: the main notebook
  • report.html: the SageMaker Project.ipynb exported in html format

Results

The main outcome of this project is a web app thant can be deployed anywhere for sentiment analysis. The web app demo is given below:

Licensing, Authors, and Acknowledgements

License: MIT

Acknowledge to Udacity and IBDM for the data.

About

A sentiment analysis web app deployed using Amazon SageMaker and PyTorch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published