Improve spellchecking for writing

This commit is contained in:
Cristiano Ferreira
2024-01-11 19:10:56 +00:00
parent a40ce04ad2
commit 61f876b3e4
4 changed files with 17 additions and 30 deletions

5
app.py
View File

@@ -9,7 +9,6 @@ from helper.file_helper import delete_files_older_than_one_day
from helper.firebase_helper import *
from helper.heygen_api import create_videos_and_save_to_db
from helper.speech_to_text_helper import *
from helper.token_counter import count_tokens
from helper.openai_interface import *
import os
import re
@@ -17,7 +16,6 @@ import logging
from dotenv import load_dotenv
from heygen.AvatarEnum import AvatarEnum
from templates.question_templates import *
load_dotenv()
@@ -250,7 +248,8 @@ def grade_writing_task_2():
message = (
"Grade this Writing Task 2 answer according to ielts grading system and provide an example of a perfect "
"answer and an elaborated comment where you deep dive into what is wrong and right about the answer."
"Provide your answer on the following json format: {'perfect_answer': 'example perfect answer', 'comment': 'comment about answer quality', 'overall': 7.0, "
"Provide your answer on the following json format: {'perfect_answer': 'example perfect answer', "
"'comment': 'comment about answer quality', 'overall': 7.0, "
"'task_response': {'Task Achievement': 0.0, 'Coherence and Cohesion': 0.0, 'Lexical Resource': 0.0, "
"'Grammatical Range and Accuracy': 0.0}}\n The question was '" + question + "' "
"and the answer was '" + answer + "'")