Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Codigos_AEG
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
ADITYA ANIL JAIN
Codigos_AEG
Commits
1bfee608
Commit
1bfee608
authored
Nov 27, 2019
by
KARTAVYA PRAVIN KOTHARI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Normalization of scores done!
parent
fb7578ac
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
main.py
main.py
+4
-0
templates/score.html
templates/score.html
+1
-1
templates/topic.html
templates/topic.html
+1
-1
No files found.
main.py
View file @
1bfee608
...
...
@@ -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
...
...
templates/score.html
View file @
1bfee608
...
...
@@ -35,7 +35,7 @@
<br
/>
<div
class=
"jumbotron"
>
<h1
class=
"display-4 text-center"
style=
"font-size: 7em;"
>
{{score}}/
6
0
</h1>
<h1
class=
"display-4 text-center"
style=
"font-size: 7em;"
>
{{score}}/
10
0
</h1>
<br
/>
<p
class=
"lead"
>
This is the score you received for your entered essay below:
</p>
<hr
class=
"my-4"
>
...
...
templates/topic.html
View file @
1bfee608
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment