Normalization of scores done!

parent fb7578ac
......@@ -95,12 +95,16 @@ async def getEssay(request):
async def evaluate(request):
body = await request.form()
score = predict(body['essay'])
print(score)
score = round(float(score)/60*100,2)
print(score)
return templates.TemplateResponse('score.html', {'request': request, 'score':score})
@app.route('/contribute',methods=["POST"])
async def evaluate(request):
body = await request.form()
score, essay, prompt = body['score'], body['essay'], body['prompt']
# score = float(score)/100
json = {
"essay": essay,
"score": score
......
......@@ -35,7 +35,7 @@
<br />
<div class="jumbotron">
<h1 class="display-4 text-center" style="font-size: 7em;">{{score}}/60</h1>
<h1 class="display-4 text-center" style="font-size: 7em;">{{score}}/100</h1>
<br />
<p class="lead">This is the score you received for your entered essay below:</p>
<hr class="my-4">
......
......@@ -38,7 +38,7 @@
<tr>
<!-- <th scope="col">#</th> -->
<th scope="col">Essays on {{topic}}</th>
<th scope="col">Score</th>
<th scope="col">Score(x/100)</th>
<!-- <th scope="col">Handle</th> -->
</tr>
</thead>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment