This project predicts whether a tweet indicates suicidal intention. It uses a machine learning model(Support Vector Classification) trained on a dataset of tweets that have been labeled as either suicidal or not suicidal.
The Dataset is contains twitter contents.
Dataset link: https://raw.githubusercontent.com/laxmimerit/twitter-suicidal-intention-dataset/master/twitter-suicidal_data.csv
- Python 3.6 or later
- NumPy
- Pandas
- Scikit-learn
- FastAPI
- Pydantic
To install the project, run the following command:
pip install -r requirements.txt
To use the project,
- First run the
main.pyfile. - Visit FastAPI/SwaggerUI page: http://127.0.0.1:8000/docs
- Click on "Try it out" button on the
POST/predict Predict Labelsection - Replace the "string" with any of your tweet or any sentence
- On the
responsesection it will display whether prediction 1 or 0
This is how it will look:
Contributions are welcome! Please open an issue or pull request if you have any ideas for improvements.
This project is licensed under the MIT License.