Update jspp.js
This commit is contained in:
parent
9fc1cc7c1f
commit
5419286c37
1 changed files with 5 additions and 5 deletions
10
jspp.js
10
jspp.js
|
@ -14,9 +14,9 @@ class JSPlusPlus {
|
||||||
isToxic(sentences) {
|
isToxic(sentences) {
|
||||||
// Load the model. Users optionally pass in a threshold and an array of
|
// Load the model. Users optionally pass in a threshold and an array of
|
||||||
// labels to include.
|
// labels to include.
|
||||||
const help = new JSPlusPlus.General.Helpers
|
const gen = new JSPlusPlus.General
|
||||||
help.require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs")
|
gen.require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs")
|
||||||
help.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 toxic = false
|
let toxic = false
|
||||||
|
|
||||||
|
@ -754,8 +754,8 @@ class JSPlusPlus {
|
||||||
|
|
||||||
|
|
||||||
initGun(relays = []) {
|
initGun(relays = []) {
|
||||||
const help = new JSPlusPlus.General.Helpers
|
const gen = new JSPlusPlus.General
|
||||||
help.require("https://cdn.jsdelivr.net/npm/gun/gun.js")
|
gen.require("https://cdn.jsdelivr.net/npm/gun/gun.js")
|
||||||
return Gun(relays)
|
return Gun(relays)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue