summary refs log tree commit diff stats
path: root/classification/main.py
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-06-05 10:30:46 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-06-05 10:30:46 +0200
commit327fc0667a42ddfdd5e8068983715fb527c299f9 (patch)
tree1f97f8ab1ff914119703b9386df651f96ddd56e5 /classification/main.py
parent993a7c1ea28968a4479a87ad6c2637a7045d2d51 (diff)
downloademulator-bug-study-327fc0667a42ddfdd5e8068983715fb527c299f9.tar.gz
emulator-bug-study-327fc0667a42ddfdd5e8068983715fb527c299f9.zip
fix 'other' categorization
Diffstat (limited to 'classification/main.py')
-rwxr-xr-xclassification/main.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/classification/main.py b/classification/main.py
index 742bb92f..db54a3f3 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"