summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xclassification/main.py12
-rwxr-xr-xollama/llm.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/classification/main.py b/classification/main.py
index 6786cc2f..3f16a281 100755
--- a/classification/main.py
+++ b/classification/main.py
@@ -1,15 +1,15 @@
 from transformers import pipeline
-from os import path
+from os import path, listdir, makedirs
 
 positive_categories = ['semantic', 'mistranslation', 'instruction', 'assembly'] # to add: register
 negative_categories = ['other', 'boot', 'network', 'KVM', 'vnc', 'graphic', 'device', 'socket'] # to add: performance
 categories = positive_categories + negative_categories
 
-def list_files_recursive(path):
+def list_files_recursive(directory):
     result = []
-    for entry in os.listdir(path):
-        full_path = os.path.join(path, entry)
-        if os.path.isdir(full_path):
+    for entry in listdir(directory):
+        full_path = path.join(directory, entry)
+        if path.isdir(full_path):
             result = result + list_files_recursive(full_path)
         else:
             result.append(full_path)
@@ -29,7 +29,7 @@ def output(text : str, category : str, labels : list, scores : list, identifier
 def main():
     classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
 
-    bugs = list_files_recursive("../mailinglist/output_mailinglist")
+    bugs = list_files_recursive("../results/scraper/mailinglist")
     bugs = bugs + list_files_recursive("./semantic_issues")
     for bug in bugs:
         print(f"Processing {bug}")
diff --git a/ollama/llm.py b/ollama/llm.py
index c1a62d90..d6ea059c 100755
--- a/ollama/llm.py
+++ b/ollama/llm.py
@@ -3,7 +3,7 @@ from re import sub
 from os import listdir, path
 
 model : str = "deepseek-r1:70b"
-directory : str = "../mailinglist/output_mailinglist"
+directory : str = "../results/scraper/mailinglist"
 
 with open("preambel", "r") as file:
     preambel = file.read()