diff --git a/app.py b/app.py index 66cfab7..9b22d2e 100644 --- a/app.py +++ b/app.py @@ -218,7 +218,7 @@ def grade_writing_task_1(): answer = data.get('answer') if not has_words(answer): return { - 'comment': "The answer does not contain any english words.", + 'comment': "The answer does not contain enough english words.", 'overall': 0, 'task_response': { 'Coherence and Cohesion': 0, @@ -256,6 +256,10 @@ def grade_writing_task_1(): 'Additionally, provide an exemplary answer with a minimum of 150 words, along with a ' 'detailed commentary highlighting both strengths and weaknesses in the response. ' '\n Question: "' + question + '" \n Answer: "' + answer + '"') + }, + { + "role": "user", + "content": 'The perfect answer must have at least 150 words.' } ] token_count = count_total_tokens(messages) @@ -314,7 +318,7 @@ def grade_writing_task_2(): answer = data.get('answer') if not has_words(answer): return { - 'comment': "The answer does not contain any english words.", + 'comment': "The answer does not contain enough english words.", 'overall': 0, 'task_response': { 'Coherence and Cohesion': 0, @@ -353,6 +357,10 @@ def grade_writing_task_2(): 'exemplary answer with a minimum of 250 words, along with a detailed commentary highlighting ' 'both strengths and weaknesses in the response.' '\n Question: "' + question + '" \n Answer: "' + answer + '"') + }, + { + "role": "user", + "content": 'The perfect answer must have at least 250 words.' } ] token_count = count_total_tokens(messages) diff --git a/requirements.txt b/requirements.txt index e1acaf9..978ac46 100644 Binary files a/requirements.txt and b/requirements.txt differ