From 327fc0667a42ddfdd5e8068983715fb527c299f9 Mon Sep 17 00:00:00 2001 From: Christian Krinitsin Date: Thu, 5 Jun 2025 10:30:46 +0200 Subject: fix 'other' categorization --- classification/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'classification/main.py') diff --git a/classification/main.py b/classification/main.py index 742bb92f3..db54a3f3b 100755 --- a/classification/main.py +++ b/classification/main.py @@ -57,9 +57,8 @@ def main(): category = label break - if label == "semantic" and score <= 0.91: - category = "other" - break + if result['labels'][0] == "semantic" and result['scores'][0] <= 0.91: + category = "other" if all(i > 0.9 for i in result["scores"]): category = "all" -- cgit 1.4.1