Skip to content

Commit c0faf3b

Browse files
committed
fix: change language detection to use detect_main_language directly in quiz_generator
1 parent 1ba4139 commit c0faf3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphgen/models/generator/quiz_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def build_prompt_for_description(description: str, template_type: str = "TEMPLAT
4343
:param template_type: Either "TEMPLATE" (same meaning) or "ANTI_TEMPLATE" (opposite meaning)
4444
:return: Prompt string
4545
"""
46-
language = "English" if detect_main_language(description) == "en" else "Chinese"
46+
language = detect_main_language(description)
4747
prompt = DESCRIPTION_REPHRASING_PROMPT[language][template_type].format(
4848
input_sentence=description
4949
)

0 commit comments

Comments
 (0)