diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-01 20:03:53 +0000 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-01 20:03:53 +0000 |
| commit | 0d42327250d4b8d521ef1b0ef17ac673b2ae2ed4 (patch) | |
| tree | f2ad7241d12baaebdfb09249d10302162f5e87aa | |
| parent | 8e05d4390d2af608edf5829583b63f3054760c02 (diff) | |
| download | qemu-analysis-0d42327250d4b8d521ef1b0ef17ac673b2ae2ed4.tar.gz qemu-analysis-0d42327250d4b8d521ef1b0ef17ac673b2ae2ed4.zip | |
fix invalid paths
| -rwxr-xr-x | classification/main.py | 12 | ||||
| -rwxr-xr-x | ollama/llm.py | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/classification/main.py b/classification/main.py index 6786cc2fe..3f16a2818 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 c1a62d909..d6ea059c0 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() |