Update jspp.js
This commit is contained in:
parent
6f9e05036b
commit
0a6c39513f
1 changed files with 5 additions and 5 deletions
8
jspp.js
8
jspp.js
|
@ -14,8 +14,8 @@ 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.
|
||||||
pp.require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs")
|
help.require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs")
|
||||||
pp.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity")
|
help.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity")
|
||||||
let threshold = 0.9;
|
let threshold = 0.9;
|
||||||
let toxic = false
|
let toxic = false
|
||||||
|
|
||||||
|
@ -750,8 +750,7 @@ class JSPlusPlus {
|
||||||
|
|
||||||
|
|
||||||
initGun(relays = []) {
|
initGun(relays = []) {
|
||||||
let pp = new JSPlusPlus
|
help.require("https://cdn.jsdelivr.net/npm/gun/gun.js")
|
||||||
pp.require("https://cdn.jsdelivr.net/npm/gun/gun.js")
|
|
||||||
return Gun(relays)
|
return Gun(relays)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -759,4 +758,5 @@ class JSPlusPlus {
|
||||||
|
|
||||||
|
|
||||||
const pp = new JSPlusPlus
|
const pp = new JSPlusPlus
|
||||||
|
const help = new JSPLusPlus.Helpers
|
||||||
const htmlFront = new JSPlusPlus.HTMLFrontend
|
const htmlFront = new JSPlusPlus.HTMLFrontend
|
||||||
|
|
Loading…
Reference in a new issue