Skip to content

vtg2000/BulliesEye

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bullies-Eye

made-with-Flask made-with-Python


Features

  • Deploy bots (crawlers) on social media platforms like Twitter, Facebook, Reddit, etc to identify inappropriate posts/comments/images/videos and report them automatically, after issuing certain number of warnings. These incidents are tracked using our “attention based” transformer model for text and “CNN-LSTM based” model for images / audios / videos.

  • An admin dashboard for bot reported cyber-bullying incidents with in-depth analytics. It will send the notifications to the victims, regarding the status of their case.

  • The bullying activity on these cases would be further monitored using the dashboard along with an option to auto-generate a report which would be mailed to the authorities.

  • A Chrome extension which would hide (for the victims) and highlight (for the admin) bullying content on any web page and keep track of WhatsApp conversations by disabling send message button with a warning if its a foul comment.

  • Another bot for chat applications like Telegram to kick out misbehaving members.


How to use it

$ # Get the code
$ git clone https://github.com/mihir2510/BulliesEye.git
$ cd BulliesEye/WebApp
$
$ # Virtualenv modules installation (Unix based systems)
$ virtualenv --no-site-packages env
$ source env/bin/activate
$
$ # Install modules
$ pip3 install -r requirements.txt
$
$ # Set the FLASK_APP environment variable
$ (Unix/Mac) export FLASK_APP=run.py
$
$ # Enable debug (for development)
$ # (Unix/Mac) export FLASK_ENV=development
$
$ # Start the application (development mode)
$ # --host=0.0.0.0 - expose the app on all network interfaces (default 127.0.0.1)
$ # --port=5000    - specify the app port (default 5000)  
$ flask run --host=0.0.0.0 --port=5000
$
$ # Access the dashboard in browser: http://127.0.0.1:5000/

For the auto-report generation to work, update the sender's email and password in routes.py

Also, update the SQL engine path in routes.py


Model Details

  • Trained custom word embeddings using word2vec algorithm on the "hatespeech" dataset from Kaggle

  • Model architecture involved,

      Embedding layer
      SpatialDropout
      BiDirectional LSTM
      Conv1D
      GlobalAveragePooling
      Dense
    
  • After training the model for 5 epochs accuracy of ~97% accuracy was achieved


Scraper Details

  • The scraper uses Tweepy for scraping tweets from Twitter which is passed into the model to check for abusive content

  • Top X most offensive tweets were displayed on admin's dashboard with an option to auto-generate report for each offensive/cyberbullying tweet and mailing to relevant authorities.

  • Admin can also search for tweets with specific offensive words.


Extension Details

  • Webapp Cyberbully Detector Extension which hides (for the victims) and highlights (for the admin) bullying content on any web page. Content includes texts & images and Extension can Highlight & Redact text , Hide Images. Chrome Extension can be found here

  • WhatsApp Cyberbully Detectorkeep Extension keeps track of WhatsApp conversations by disabling send message button with a warning if its a foul comment. Chrome Extension can be found here


Telegram Bot

  • Telegram Bot to kick out misbehaving members. 3 warnings are given and the person is kicked out from the group

  • It is trained on our Custom model for detecting texts and Content Moderation API for NSFW images.


Use Case


  • Data, “crawled” from social media websites viz “the internet” is stored in DB. Model classifies these threads/comments as toxic or not.

  • These results along with additional features like analytics, topic modelling, report facilities, etc are displayed in the Web UI.

  • “Chrome extension” accesses current web page’s content.This content is sent to the background script, where the model does the classification.

  • The “filtered content” is displayed back to the page, in a way preventing the display of explicit content.


TODO

  • Implement Transformer architecture
  • Currently it's deployed as a Twitter and Telegram Bot, target other platforms like Reddit and Facebook
  • Turn the Dashboard into a PWA

Contributors



Dashboard Credits

Flask Dashboard AdminLTE - provided by AppSeed


Disclamer

The texts & images were used in our app for testing purpose only. We don't encourage anybody to use it for crime or cyberbullying.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 49.0%
  • HTML 34.6%
  • CSS 15.6%
  • Python 0.8%
  • PHP 0.0%
  • Mako 0.0%