Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,14 +32,15 @@ def intelligent_tutor(audio_file, provide_hints=False):
|
|
32 |
global user_input_counter
|
33 |
global conversation_history
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
38 |
|
39 |
conversation = [
|
40 |
{
|
41 |
"role": "system",
|
42 |
-
"content": f"
|
43 |
},
|
44 |
{"role": "user", "content": input_text}
|
45 |
]
|
|
|
32 |
global user_input_counter
|
33 |
global conversation_history
|
34 |
|
35 |
+
if provide_hints:
|
36 |
+
# If hints are requested, provide guidance on how to answer using the strategy text
|
37 |
+
hint_message = f"Consider using the {strategy_text[current_question_index]} to answer the question: '{questions[current_question_index]}'."
|
38 |
+
return f"Respond to this Question: {questions[current_question_index]}", hint_message
|
39 |
|
40 |
conversation = [
|
41 |
{
|
42 |
"role": "system",
|
43 |
+
"content": f"You are an expert English Language Teacher in a Singapore Primary school, directly guiding a Primary 6 student in Singapore. The student is answering the question: '{questions[current_question_index]}'. Based on their response, provide direct feedback to help them improve their spoken skills. Emphasize areas of strength, suggest areas of improvement, and guide them on how to better answer using the {strategy_text[current_question_index]} strategy. The feedback should be in second person, addressing the student directly."
|
44 |
},
|
45 |
{"role": "user", "content": input_text}
|
46 |
]
|