From 81aabdfb07451b663536e01b788634b446052141 Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Fri, 31 May 2024 23:27:46 +0000 Subject: [PATCH] Update jspp.js --- jspp.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/jspp.js b/jspp.js index 4d5d74d..151b7b9 100644 --- a/jspp.js +++ b/jspp.js @@ -19,12 +19,9 @@ class JSPlusPlus { gen.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity") let threshold = 0.9; let t = await toxicity.load(threshold).then(model => { - let m =model.classify(sentences).then(predictions => { - let p = await predictions - console.log(p) - return p + return model.classify(sentences).then(predictions => { + return predictions }); - return m }); return t }