Update app.py
Browse files
app.py
CHANGED
@@ -25,12 +25,20 @@ def predict(question_choice, audio):
|
|
25 |
|
26 |
# Construct the conversation with the system and user's message
|
27 |
conversation = [
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
response = openai.ChatCompletion.create(
|
36 |
model='gpt-3.5-turbo',
|
|
|
25 |
|
26 |
# Construct the conversation with the system and user's message
|
27 |
conversation = [
|
28 |
+
{
|
29 |
+
"role": "system",
|
30 |
+
"content": f"""
|
31 |
+
You are an expert English Language Teacher in a Singapore Primary school, directly guiding a Primary 6 student in Singapore.
|
32 |
+
The student is answering the question: '{question_choice}'.
|
33 |
+
Point out areas they did well and where they can improve, following the {strategy}.
|
34 |
+
Encourage the use of sophisticated vocabulary and expressions.
|
35 |
+
For the second and third questions, the picture is not relevant, so the student should not refer to it in their response.
|
36 |
+
{explanation}
|
37 |
+
The feedback should be in second person, addressing the student directly.
|
38 |
+
"""
|
39 |
+
},
|
40 |
+
{"role": "user", "content": message}
|
41 |
+
]
|
42 |
|
43 |
response = openai.ChatCompletion.create(
|
44 |
model='gpt-3.5-turbo',
|