JoyFeed is a browser extension that analyzes human emotions using machine learning and filters negative posts on unhappy users' social feed based on its sentimental value. Built during AngelHack San Francisco 2016 by Chris Wong & Cyrus Goh, it won HPE’s Haven OnDemand Challenge for the “most innovative cognitive computing solution to augment human intelligence using the HPE Haven OnDemand natural language processing, machine learning, and predictive analytics APIs.”
- All extension code is located in the ”extension” folder.
- All resources (icons, training data, parser etc.) are located in the ”resources” folder.
- HPE Haven OnDemand
- Train Prediction API
- Predict API
- Sentiment Analysis API
- Microsoft Cognitive Services’ Emotion API
- Imgur API
How To Use
As JoyFeed utilizes the APIs listed above to function, you are required to sign up for each service in order to obtain an API key for all of them.
- Clone or download JoyFeed’s repository.
- Navigate to HPE Haven OnDemand’s sign up page and sign up for an account.
- Navigate to HPE Haven OnDemand’s API keys page and copy the API key.
extension/popup.jsin your favorite text editor and replace
YOUR_HAVEN_API_KEYwith the API key copied in the previous step.
- Navigate to Microsoft Cognitive Services’ subscription page. You should be prompted to sign in. Once you sign in, scroll down until you see “Emotion - Preview”. Click “Show” to see the API key and copy the key down.
- In the same
popup.jsfile as step 3, replace
YOUR_MICROSOFT_API_KEYwith the API key copied in the previous step.
- Navigate to Imgur’s application registration page. You should be prompted to sign in. Once you sign in, use any name to register your application and fill the “Authorization callback URL” with “https://imgur.com” without quotes.
- After the registration, navigate to your “Created Apps” page and you should see your newly created app listed. Copy the “Client ID”.
- In the same
popup.jsfile as step 3, replace
YOUR_IMGUR_API_KEYwith the Client ID copied in the previous step.
Training HPE Haven OnDemand’s Prediction Model
In order to use machine learning to predict how the user is feeling, we have to train the prediction model first. Since Haven OnDemand’s Predict API can only access models trained on the same account, you will have to train it manually using the dataset we provide.
- Navigate to HPE Haven OnDemand’s Train Prediction’s “Try It” page. Sign in to your account if you haven’t done so.
- Under “Parameters - file”, click “Select File”. Navigate to your JoyFeed folder and select
- Under “prediction_field”, enter “Emotion” (case-sensitive).
- Under “service_name”, enter “joyfeed” (case-sensitive).
- Click the green “Try It” button on the lower right corner.
- Wait for the response. It should say “Ready” when it has done training the model.
Installing The Chrome Extension
- Navigate to Chrome’s Extensions page.
- Check “Developer mode” on the top right corner.
- Click the “Load unpacked extension…” button. Select the JoyFeed folder that you have downloaded, and it should appear in the list of extensions.
- JoyFeed’s green icon should appear on the row of extensions next to the address bar.
- Right click JoyFeed’s green icon and select “Options”. In order to use JoyFeed, you have to grant JoyFeed access to your webcam.
- Navigate to Twitter.
- Sign in if you’re not logged in.
- Click on JoyFeed’s green icon.
- Perform some positive/neutral/negative facial expression and click on the white “JoyFeed” button. A white, half-transparent layer will appear over your Twitter timeline.
- Leave the popup window open until the half-transparent layer is gone. This should take some time, probably up to a minute or two.
- Once the layer has disappeared, you can now close the popup window. You should see the positive tweets highlighted in green and negative tweets highlighted in red. The unhighlighted tweets are determined as neutral.
- If you would like to hide the negative tweets, you can click on JoyFeed’s extension to open up the popup window again and click on the “Hide filtered tweets” button. All the tweets highlighted in red will disappear.
- Photos are uploaded using the Imgur API and will be public. We do not store nor collect any of your photos.
- We do not collect, store nor access any browsing activity.
- Your Twitter timeline’s tweets are sent directly to HPE Haven OnDemand’s Sentiment Analysis to be processed. We do not store nor collect any of your tweets.
- Please refer to HPE’s Terms of Service and Privacy Statement for the use of Train Prediction API, Predict API and Sentiment Analysis API.
- Please refer to Microsoft Cognitive Services’ Terms and Privacy Statement for the use of Emotion API.