Skip to content

Commit 1ba4139

Browse files
committed
fix: change language detection to use detect_main_language directly
2 parents ccaf863 + ad5d681 commit 1ba4139

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 = "en" if detect_main_language(description) == "en" else "zh"
46+
language = "English" if detect_main_language(description) == "en" else "Chinese"
4747
prompt = DESCRIPTION_REPHRASING_PROMPT[language][template_type].format(
4848
input_sentence=description
4949
)

0 commit comments

Comments
 (0)