diff --git a/recognizer/components/detector.py b/recognizer/components/detector.py index 2f99786..16188b6 100644 --- a/recognizer/components/detector.py +++ b/recognizer/components/detector.py @@ -20,6 +20,7 @@ warnings.filterwarnings("ignore", category=UserWarning, message="TypedStorage is deprecated") +from deep_translator import GoogleTranslator class DetectionModels: def __init__(self) -> None: @@ -291,6 +292,7 @@ def detect( # Making best guess if its area_captcha if user did not specify area_captcha = "square" in prompt if area_captcha is None else area_captcha label = split_prompt_message(prompt) + label = GoogleTranslator(source='auto', target='en').translate(label) if label not in self.challenge_alias: print(f"[ERROR] Types of challenges of label {label} not yet scheduled (Prompt: {prompt}).")