In this project, we trained three different types of models, logistic regression, LSTM, and a transformer, to detect suicide ideation and other mental illnesses within text. We trained our models on posts from Reddit that were labeled with either suicide, depression, anxiety, bipolar, or a general "off my chest". We checked the performance metrics of each of the models to see which performed the best.
The notebooks containing our models are located within the backend directory under the Models folder. Ensure that the required Python packages are installed, and then you can run all the cells or run each one individually. If there are issues with loading the .csv file, try modifying the train_path
.
- download https://drive.google.com/drive/folders/1rvNHd5KAjbQiDnMtl5f0T6zr2vxvjcZG?usp=sharing and drag into backend folder
- download https://drive.google.com/file/d/1weORXOlDyhuXr3-QJD_PgRowT1doh2kZ/view?usp=sharing and drag into backend folder
pip install flask
cd backend
- Windows Powershell:
set FLASK_APP=app.py
- Windows Command Prompt:
$env:FLASK_APP = "app.py"
- MacOS/Linux:
export FLASK_APP=app.py
flask run
- make sure Node.js is installed
cd frontend
npm install
npm start