Views
No views yet
DISCLAIMER: This model is not a substitute for professional mental-health services or emergency intervention. If you or someone you know is in crisis, seek professional help (e.g., call emergency services or hotlines like988in the US). This model may be incorrect or incomplete. Use responsibly, and see Limitations below.
"suicidal" and non-suicidal posts as "non-suicidal".1from transformers import AutoTokenizer, AutoModelForCausalLM
2# or from unsloth import FastLanguageModel if you used Unsloth
3
4text = "Life is too painful. I'm done. I want to end it."
5
6# 1) Classify
7classification = model("Determine if the following text is suicidal:\n" + text)
8print("Classification:", classification)
9# e.g., "suicidal"
10
11# 2) Therapeutic Response Example:
12
13response = model("Respond like a therapist:\n" + text, max_new_tokens=256)
14print("Therapy-Style Reply:", response)