Improve speaking corrections to return fixed_text.

This commit is contained in:
Cristiano Ferreira
2024-01-17 16:37:59 +00:00
parent 92c92dfd98
commit 1591f8d9fb
2 changed files with 7 additions and 11 deletions

6
app.py
View File

@@ -347,7 +347,7 @@ def grade_speaking_task_1():
None,
GEN_QUESTION_TEMPERATURE)
response['transcript'] = answer
response['corrections'] = get_speaking_corrections(answer)
response['fixed_text'] = get_speaking_corrections(answer)
return response
else:
return {
@@ -415,7 +415,7 @@ def grade_speaking_task_2():
None,
GEN_QUESTION_TEMPERATURE)
response['transcript'] = answer
response['corrections'] = get_speaking_corrections(answer)
response['fixed_text'] = get_speaking_corrections(answer)
return response
else:
return {
@@ -532,7 +532,7 @@ def grade_speaking_task_3():
for i, answer in enumerate(text_answers, start=1):
response['transcript_' + str(i)] = answer
response['corrections_' + str(i)] = get_speaking_corrections(answer)
response['fixed_text_' + str(i)] = get_speaking_corrections(answer)
return response
except Exception as e:
return str(e), 400