Downloads · 30 days
0
aayush0/BertFineTunedSentiment
BertFineTunedSentiment is a machine learning model from aayush0. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This Streamlit web application predicts the mental health status from a given text input using a fine-tuned BERT model. The model classifies text into one of seven categories: Depression, Stress, Suicidal, Normal, Bip…
Downloads · 30 days
0
Access
Public
Updated Sep 20, 2024
Repo size
438 MB
Likes
0
Public
Click a slice to open those files.
.pth438 MB · 100%
From the Hugging Face model README
This Streamlit web application predicts the mental health status from a given text input using a fine-tuned BERT model. The model classifies text into one of seven categories: Depression, Stress, Suicidal, Normal, Bipolar, Anxiety, and Personality Disorder.
To run this project locally, follow these steps:
HTTPS:
# Make sure you have git-lfs installed (https://git-lfs.com)
git lfs install
# When prompted for a password, use an access token with write permissions.
# Generate one from your settings: https://huggingface.co/settings/tokens
git clone https://huggingface.co/aayush0/BertFineTunedSentiment
# If you want to clone without large files - just their pointers
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/aayush0/BertFineTunedSentiment
SSH:
# Make sure you have git-lfs installed (https://git-lfs.com)
git lfs install
# Make sure your SSH key is properly setup in your user settings.
# https://huggingface.co/settings/keys
git clone [email protected]:aayush0/BertFineTunedSentiment
# If you want to clone without large files - just their pointers
GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:aayush0/BertFineTunedSentiment
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
The required dependencies include:
streamlittorchtransformersThe model and tokenizer will be downloaded automatically when running the app for the first time. You need to manually download and place the fine-tuned model weights in the project folder.
sentiment_model_BERT (1).pth is in the root folder of your project.streamlit run app.py
This will launch the app, and you can interact with it via your browser at http://localhost:8501.
The BERT model is fine-tuned for sequence classification with 7 labels, corresponding to different mental health statuses:
This project is licensed under the MIT License - see the LICENSE file for details.