Improve speaking corrections to return fixed_text.
This commit is contained in:
6
app.py
6
app.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user