Skip to content

Muslimahhh/DetectHer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Based Harassment Detector for Social Media

This project implements an AI-based machine learning model designed to detect and classify misogynistic, abusive, and harmful comments directed at women on social media platforms. The system identifies inappropriate content in real-time, enabling further moderation actions. Built using traditional machine learning techniques, the model focuses on accurate classification to support safer online environments.


Table of Contents

  1. Installation
  2. Setup Instructions
  3. Running the Model

Installation

To get this project up and running, you’ll need Python installed on your system. We’ll also be using a virtual environment to keep all the dependencies organized (trust me, it’s way cleaner that way!). Just follow the steps below to get everything set up and ready for action.


Setup Instructions

Follow these steps to get the project running locally on your machine:

1. Clone the Repository

First, clone the project to your local machine with this command:

git clone https://github.com/your-username/your-repo.git

2. Navigate to the Project Directory

Next, head into the project directory:

cd your-repo

3. Set Up a Virtual Environment

Create a fresh virtual environment to keep your project dependencies clean and isolated:

python -m venv venv

4. Activate the Virtual Environment

Now, activate the virtual environment to make sure all the dependencies get installed in the right place:

  • On Windows:

    venv\Scripts\activate
  • On MacOS:

    source venv/bin/activate

5. Install Dependencies

With your virtual environment up and running, install all the necessary dependencies from the requirements.txt file:

pip install -r requirements.txt

Running the Model

Once everything is set up, you're ready to run the model:

  • To train the model and understand how it works, run this command:

    python train_model.py
  • To test the model and check out its performance, execute:

    python test_model.py

Muslimah Sarumi | University of Bolton | 2025

About

DetectHer is a lightweight ML project that detects gendered harassment on Twitter using interpretable models like Logistic Regression and SVM. Built from scratch with real-time scraped data and TF-IDF features, it balances accuracy, speed, and transparency, no black-box models, no GPU needed.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors