Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ivanrj7j/suicide-prevention-reddit


https://github.com/ivanrj7j/suicide-prevention-reddit

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

        

# Suicide Detection AI and Reddit Scraper

Welcome to the Suicide Detection AI and Reddit Scraper project! This repository contains an artificial intelligence model that scans text for suicidal content and a Reddit scraper that collects posts from the homepage. The AI model is built using TensorFlow and has been trained on a dataset comprising 130,000 comments from the internet, achieving an impressive accuracy of 95%, recall of 90%, and precision of 93% on validation data.

## Table of Contents
- [Introduction](#suicide-detection-ai-and-reddit-scraper)
- [Features](#features)
- [How to Run](#how-to-run)
- [Dependencies](#dependencies)
- [Installation](#installation)
- [Contributing](#contributing)
- [License](#license)

## Features

### Suicide Detection AI
- Uses TensorFlow to create a robust model for detecting suicidal content in text.
- Trained on a diverse dataset of 130,000 comments from the internet.
- Achieves high performance with `95% accuracy, 90% recall, and 93% precision` on validation data.

### Reddit Scraper
- Utilizes Selenium to scrape posts from the Reddit homepage.
- Provides a tool for collecting data for further analysis or research.

## How to Run

Follow these steps to run the program:

1. Clone the repository to your local machine:

```bash
git clone https://github.com/ivanrj7j/Suicide-Prevention-Reddit
cd Suicide-Prevention-Reddit
```

2. Install the required dependencies. See [Dependencies](#dependencies) section for details.

3. Run the program:

```bash
python scrape.py
```

This will execute the Suicide Detection AI and initiate the Reddit scraper.

## Dependencies

Make sure you have the following dependencies installed:

- Python 3.x
- TensorFlow (version X.X.X)
- Selenium (version X.X.X)
- Other dependencies...

## Installation

1. Install Python 3.x from [python.org](https://www.python.org/).

1. ```bash
pip install -r requirements.txt
```

## Model

The model was trained using 2 datasets, an [emotion classification](https://huggingface.co/datasets/dair-ai/emotion) dataset by `dair-ai` and a [suicide prevention](https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watch) dataset by `NIKHILESWAR KOMATI`. These 2 datasets were used to balance the dataset.

- Training dataset had 137967 rows
- Testing dataset had 34492 rows

Model was trained succesfully and model had

- `95% accuracy`
- `90% recall`
- `93% precision`

on validation data

## Contributing

If you'd like to contribute to this project you are welcome!.

## License

This project is licensed under the MIT License.