diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-05 10:30:46 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-05 10:30:46 +0200 |
| commit | 327fc0667a42ddfdd5e8068983715fb527c299f9 (patch) | |
| tree | 1f97f8ab1ff914119703b9386df651f96ddd56e5 /classification/main.py | |
| parent | 993a7c1ea28968a4479a87ad6c2637a7045d2d51 (diff) | |
| download | qemu-analysis-327fc0667a42ddfdd5e8068983715fb527c299f9.tar.gz qemu-analysis-327fc0667a42ddfdd5e8068983715fb527c299f9.zip | |
fix 'other' categorization
Diffstat (limited to '')
| -rwxr-xr-x | classification/main.py | 5 |
1 files changed, 2 insertions, 3 deletions
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" |