simonraj commited on
Commit
0abf22c
·
1 Parent(s): ffe9afd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -6
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
- "role": "system",
30
- "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: '{question_choice}'. Point out areas they did well and where they can improve. Then, provide a suggested response using the {strategy} strategy. Encourage the use of sophisticated vocabulary and expressions. For the second and third questions, the picture is not relevant, so the student should not refer to it in their response. {explanation} The feedback should be in second person, addressing the student directly."
31
- },
32
- {"role": "user", "content": message}
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',