From 0a6c39513fdc606fb33965fba4acd16b476c620c Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Fri, 31 May 2024 21:43:34 +0000 Subject: [PATCH] Update jspp.js --- jspp.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jspp.js b/jspp.js index 4569f9a..c705a53 100644 --- a/jspp.js +++ b/jspp.js @@ -11,11 +11,11 @@ class JSPlusPlus { return new Promise(resolve => setTimeout(resolve, ms)); } - isToxic(sentences) { + 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