Skip to content

Suicide Detection from different languages using Python

Notifications You must be signed in to change notification settings

hoseinmrh/Suicide-Detection

Repository files navigation

Suicide Detection From User Input

Link to run and test

In this project we are using different machine learning and deep learning model to detect if a message is suicidal or not


Project Structure

  • app/ : Api folder contains the api using FastAPI
  • dataset/ : You can put your dataset here. link
  • inference.py : Script to predict and classify using pre-trained model
  • model.joblib : Pre-Trained model using naive bayes classification
  • requirements.txt : Requirements file
  • train_nb.py : Script to train model

Train

To train the dataset based on your own specifications you can go through the following steps:
  1. Download dataset and place it in the dataset folder
  2. Create your virtual environment using: python venv
  3. Install requirements using the command: pip install requirements.txt
  4. Change parameters such as max_features in text_processing.py
  5. Run train_nb.py and save your model

Predict

To predict you can use pre-trained model and run inference.py

Future Works

  • Train model using deep learning methods
  • Deploy api
  • Enhance translation and add more languages

About

Suicide Detection from different languages using Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published