Skip to content

im-utkarsh/toxic-language-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

toxic-language-detection

predicts toxicity present in a sentence using tensorflow.js

Bundle model can be used via script tag in hedder:

<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity"></script>

Model can be loaded in javascript like this:

toxicity.load(/*variables*/)
  .then(model=>{
    //do predictions with model
  })

Some pretrained tfjs models can be found here
Most of the code is taken from here