From 3d468c369cee8054cd80ed4880960f275cc1ff99 Mon Sep 17 00:00:00 2001 From: Zack Pollard Date: Sun, 26 Feb 2023 04:02:35 +0000 Subject: [PATCH] fix: machine learning only take results with > 90% confidence (#1875) --- machine-learning/src/main.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/machine-learning/src/main.py b/machine-learning/src/main.py index 42de36a53e..a656860475 100644 --- a/machine-learning/src/main.py +++ b/machine-learning/src/main.py @@ -45,11 +45,8 @@ def run_engine(engine, path): for index, pred in enumerate(predictions): tags = pred['label'].split(', ') - if (index == 0): - result = tags - else: - if (pred['score'] > 0.5): - result = [*result, *tags] + if (pred['score'] > 0.9): + result = [*result, *tags] if (len(result) > 1): result = list(set(result))