From 6d2a50dcdf6e8535fd7c0c89abfac8aad59d7a99 Mon Sep 17 00:00:00 2001 From: Floke Date: Fri, 18 Apr 2025 10:57:37 +0000 Subject: [PATCH] bugfix --- brancheneinstufung.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/brancheneinstufung.py b/brancheneinstufung.py index 9098d17a..97b8e960 100644 --- a/brancheneinstufung.py +++ b/brancheneinstufung.py @@ -36,19 +36,20 @@ from difflib import SequenceMatcher import unicodedata import csv import gender_guesser.detector as gender -from urllib.parse import urlparse, urlencode +# --- HIER unquote hinzufügen --- +from urllib.parse import urlparse, urlencode, unquote import argparse import pandas as pd import numpy as np -# --- NEUE IMPORTE für ML --- from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.impute import SimpleImputer from sklearn.tree import DecisionTreeClassifier, export_text from sklearn.metrics import accuracy_score, classification_report, confusion_matrix -import json # Zum Speichern der Muster als JSON (optional) -import pickle # Zum Speichern des trainierten Modells und Imputers -import concurrent.futures # Für parallele Verarbeitung (bereits vorhanden) -import threading # Für Semaphore (bereits vorhanden) +import json +import pickle +import concurrent.futures +import threading +import traceback # Importiere traceback für detailliertere Fehlermeldungen # --- Ende neue Importe --- # Optional: tiktoken für Token-Zählung (Modus 8)