In an effort to combat toxicity on the internet, the Perspective API uses machine learning to attempt to determine the toxic intent of a comment. This repo uses that API to compare the toxic probability of the comment to a threshold in the application to deem if it would allowed or not.
Check out the demo to see it in action!
- Clone this repository with
git clone https://github.com/tsnolan23/comment-toxicity-filter
- Change into the repo directory with
cd comment-toxicity-filter
- Install dependencies with
yarn install
- Rename the
.env.example
file to.env
- Provide a Google API key with the Perspective API enabled in the
.env
file - Start up the app
yarn start