From cc9a7d6515e7008f12edd80af5b29fe36358b9be Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Fri, 31 May 2024 23:11:37 +0000 Subject: [PATCH] Update jspp.js --- jspp.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jspp.js b/jspp.js index a3a2f73..b12995b 100644 --- a/jspp.js +++ b/jspp.js @@ -18,11 +18,10 @@ class JSPlusPlus { gen.require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs") gen.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity") let threshold = 0.9; - var per = "" - toxicity.load(threshold).then(model => { - model.classify(sentences).then(predictions => { + return toxicity.load(threshold).then(model => { + return model.classify(sentences).then(predictions => { console.log(predictions) - per = predictions + return predictions }); }); }