Skip to content
/ safe_ Public

Protecting Twitter users through Sentiment Analysis and LLMs

License

Notifications You must be signed in to change notification settings

Daaiid/safe_

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

safe_

Pronounced "safespace"

A HSLU HackSTAIR project in the middle of October 2023.

Goal

Protecting Twitter users from polarizing, overly negative, or hurtful content through sentiment analysis.

How it works

How it works

Usage

Prerequisites

Variant 1: Hosted API

recommended, only inside HSLU network

  1. Install the Browser Extension
  2. Open Twitter in your browser & login.
  3. enjoy using Twitter with safe_

Variant 2: run everything locally

designed for local testing

  1. Install python 3.11
  2. Clone this repository
  3. Open the api_project subfolder in a command line
  4. run pip install -r requirements.txt to install dependencies
  5. Place .env file provided by the team in api_project folder
  6. run python -m uvicorn main:app --host 0.0.0.0 --port 8000 --env-file .env
  7. Make sure to allow TCP Port 8000 in your local firewall
  8. Navigate to <Repo>/client/addon/content_scripts and change line 6 of twitter.js to const SAFE__API_HOST = SAFE__API_HOST_LOCAL
  9. Install the Browser Extension
  10. Open Twitter in your browser & login.
  11. enjoy using Twitter with safe_

Install Browser Extension

  1. Clone this repository (if not done already)
  2. Configure your browser to allow insecure content for twitter.com See detailed Instructions for Google Chrome and Microsoft Edge
  3. Manage Extensions - turn on developer mode

extensions dev_mode

  1. Manage Extensions - "Load unpacked" and browse to <Repo>/client/addon (In case the extension is already loaded, remove it first)

load success

Enable insecure content in Google Chrome

  1. Open Google Chrome Settings
  2. Search for "insecure"
  3. Go to "Site Settings"
  4. Scroll down to "Additional content settings"
  5. Open "Insecure content" and add twitter.com to "Allowed to show insecure content"

Enable insecure content in Microsoft Edge

  1. Open Microsoft Edge Settings
  2. Search for insecure (unsicher)
  3. Scroll down to "Insecure content" (unsicherer Inhalt)
  4. Open "Insecure content" and add twitter.com under "Allow"

Team

  • Robin Matter
  • Said Aroua
  • Nicola Le
  • Joël Ammann

About

Protecting Twitter users through Sentiment Analysis and LLMs

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •