From 0ce2bb1561d9257712937e14e2b2a20f5d574df1 Mon Sep 17 00:00:00 2001 From: Maciej Kotowski Date: Thu, 9 Dec 2021 11:13:13 +0100 Subject: [PATCH] move logs to console --- public/index.html | 6 +++--- src/components/Ai/index.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/index.html b/public/index.html index 8507e91..004d515 100644 --- a/public/index.html +++ b/public/index.html @@ -29,8 +29,8 @@
Trash Recognizer logo
- - - + + + diff --git a/src/components/Ai/index.tsx b/src/components/Ai/index.tsx index bc06e49..c8df771 100644 --- a/src/components/Ai/index.tsx +++ b/src/components/Ai/index.tsx @@ -36,9 +36,11 @@ function Ai() { const identify = async () => { if (textInputRef.current && imageRef.current) { textInputRef.current.value = ""; - const results = await model?.classify(imageRef.current); + const results:any = await model?.classify(imageRef.current); setResults(results); + console.log(results[0]) } + }; const handleOnChange = (e: any) => { @@ -87,9 +89,7 @@ function Ai() { return (
{result.className} - - Confidence level: {(result.probability * 100).toFixed(2)}% {index === 0 && Best Guess} - +
); })}