Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions recognizer/components/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

warnings.filterwarnings("ignore", category=UserWarning, message="TypedStorage is deprecated")

from deep_translator import GoogleTranslator

class DetectionModels:
def __init__(self) -> None:
Expand Down Expand Up @@ -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}).")
Expand Down