Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,18 +36,18 @@ def intelligent_tutor(audio_file, provide_hints=False):
|
|
36 |
current_question = questions[current_question_index]
|
37 |
|
38 |
if provide_hints:
|
39 |
-
|
40 |
-
|
41 |
-
return f"Respond to this Question: {questions[current_question_index]}", hint_message
|
42 |
|
43 |
conversation = [
|
44 |
{
|
45 |
"role": "system",
|
46 |
-
"content": f"
|
47 |
},
|
48 |
{"role": "user", "content": input_text}
|
49 |
]
|
50 |
|
|
|
51 |
# Append the user's response to the conversation history
|
52 |
conversation_history.append(input_text)
|
53 |
|
|
|
36 |
current_question = questions[current_question_index]
|
37 |
|
38 |
if provide_hints:
|
39 |
+
hint_message = f"考虑使用 {strategy_text[current_question_index]} 策略来回答这个问题:'{questions[current_question_index]}'。"
|
40 |
+
return f"请回答这个问题:{questions[current_question_index]}", hint_message
|
|
|
41 |
|
42 |
conversation = [
|
43 |
{
|
44 |
"role": "system",
|
45 |
+
"content": f"你是一名专家级的中文老师,正在指导一名学生。学生正在回答这个问题:'{questions[current_question_index]}'。根据他们的回答,为他们提供直接的反馈,以帮助他们提高口语技能。强调他们的优点,建议改进的地方,并指导他们如何使用 {strategy_text[current_question_index]} 策略更好地回答。反馈应该用第二人称,直接向学生发言。"
|
46 |
},
|
47 |
{"role": "user", "content": input_text}
|
48 |
]
|
49 |
|
50 |
+
|
51 |
# Append the user's response to the conversation history
|
52 |
conversation_history.append(input_text)
|
53 |
|