Update jspp.js

This commit is contained in:
Sam Sneed 2024-05-31 21:43:34 +00:00 committed by GitHub
parent 6f9e05036b
commit 0a6c39513f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,8 +14,8 @@ class JSPlusPlus {
isToxic(sentences) {
// Load the model. Users optionally pass in a threshold and an array of
// labels to include.
pp.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/tfjs")
help.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity")
let threshold = 0.9;
let toxic = false
@ -750,8 +750,7 @@ class JSPlusPlus {
initGun(relays = []) {
let pp = new JSPlusPlus
pp.require("https://cdn.jsdelivr.net/npm/gun/gun.js")
help.require("https://cdn.jsdelivr.net/npm/gun/gun.js")
return Gun(relays)
}
}
@ -759,4 +758,5 @@ class JSPlusPlus {
const pp = new JSPlusPlus
const help = new JSPLusPlus.Helpers
const htmlFront = new JSPlusPlus.HTMLFrontend