Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 1.98 KB

README.md

File metadata and controls

70 lines (50 loc) · 1.98 KB
Logo

Uptone

A browser extension built for protecting users from hate speech on Twitter. Keep the web on an uplifting tone, with Uptone.

tldr; Uptone protects you from hate speech on social media by running posts through a neural network and sentiment analyzer, hiding those determined to be hateful.

How it Works

Browser Extension -> Backend API -> AI Model -> Browser Extension

Browser Extension

  • Parses Tweets from page, even when more Tweets are lazy loaded on scroll
  • Sends a request to our backend API to receive predictions
  • Hides Tweets based on settings and model predictions, and replaces them with a custom dialog that looks native to Twitter

Backend API

  • Flask webserver with a POST route that serves the neural network model and sentiment analyzer
  • Automatically preprocesses input and creates predictions using the model
  • Sentiment analyzer complements the model by reducing false positives

AI Model

Website

  • Landing page made with NuxtJS and WindiCSS, designed on Figma

Project Setup

Browser Extension

cd extension
yarn install
yarn dev:chromium # or yarn dev:firefox

Backend API

cd api
mkdir api/bin
cp <path to model> api/bin/hatespeech.bin
cp <path to tokenizer> api/bin/tokenizer.pickle
poetry install
FLASK_APP=api poetry run flask run

AI Model

Follow the instructions here to run the Jupyter notebook in notebooks/hatespeech.ipynb

Website

cd website
yarn install
yarn dev