Update jspp.js

This commit is contained in:
Sam Sneed 2024-05-31 23:23:17 +00:00 committed by GitHub
parent 19d54b7e20
commit b4fc52365e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@ class JSPlusPlus {
gen.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity") gen.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity")
let threshold = 0.9; let threshold = 0.9;
let t = await toxicity.load(threshold).then(model => { let t = await toxicity.load(threshold).then(model => {
let m = await model.classify(sentences).then(predictions => { let m =model.classify(sentences).then(predictions => {
let p = await predictions let p = await predictions
console.log(p) console.log(p)
return p return p