Skip to content

Latest commit

 

History

History

feedback_sentiment_analyzer

Feedback Sentiment Analyzer (FSA)

Feedback Sentiment Analyzer (FSA) is an example application that showcases AWS services and SDKs. Built with ❤️ for you to explore, download, and deploy.

What it does

Specifically, this application solves a fictitious use case of a hotel in New York City that receives guest feedback on comment cards in a variety of languages.

These comment cards are uploaded through a web client, transformed using a suite of machine learning services, and rendered through the same web client. The end result contains the original image, an English translation of the text, and an audio element.


SDK implementations

This application has been implemented with the following AWS SDKs.

To deploy one of these implementations, follow the Deployment instructions.


AWS services used

This application uses a suite of AWS machine learning services to do the following:

Additionally, the application showcases the following AWS services:


Deployment instructions

This application is deployed using the AWS Cloud Development Kit (AWS CDK).

  1. Get AWS credentials.

  2. Set the following environment variables:

    • FSA_NAME - Any text less than 10 characters
    • FSA_EMAIL - A valid email address that you own
    • FSA_LANG - Any of the implemented languages

    For example:

    Bash

    export FSA_NAME=ana
    export [email protected]
    export FSA_LANG=ruby
    

    Windows cmd

    set FSA_NAME=ana
    set [email protected]
    set FSA_LANG=ruby
    

    Windows Powershell

    $Env:FSA_NAME = ana
    $Env:FSA_EMAIL = [email protected]
    $Env:FSA_LANG = ruby
    
  3. Run the following commands:

    cd cdk
    npm install
    cdk deploy
    

    After deploying, observe the Output in your terminal session. Copy the CloudFront distribution URL, which has websiteurl in the name. console output Paste this URL into a browser to launch the application.


Application instructions

Sign in

  1. Choose Sign in.
  2. Enter the the email from FSA_EMAIL into the Username field.
  3. Enter the temporary password that was sent to you into the Password field.

login form

  1. Reset your password as prompted.

Upload images

  1. Signing in directs you to a landing page that says No data found.

empty

  1. Choose Upload.
  2. Choose Select a file.

Note: Feel free to choose a sample comment instead of writing your own. 4. Select a PNG or JPEG image that contains a positive comment about the hotel. Negative comments are saved, but not returned to the frontend.

upload

  1. Choose Upload.

Play the result

  1. Wait. The image upload takes a minute or two to process. CloudFront will also cache API responses for five minutes. To speed things up, create a CloudFront invalidation.
  2. Choose the Refresh button.

refresh

  1. You should see a card with the original image, translated text, and a play button.

translated text

  1. Choose the play button to listen to the translated audio.