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
851fb1d8
Commit
851fb1d8
authored
Nov 26, 2019
by
KARTAVYA PRAVIN KOTHARI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated UI
parent
dfc509fe
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
37 deletions
+63
-37
__pycache__/prediction.cpython-37.pyc
__pycache__/prediction.cpython-37.pyc
+0
-0
main.py
main.py
+8
-3
templates/contribute.html
templates/contribute.html
+6
-4
templates/index.html
templates/index.html
+7
-4
templates/login.html
templates/login.html
+11
-8
templates/register.html
templates/register.html
+11
-8
templates/score.html
templates/score.html
+4
-2
templates/thanks.html
templates/thanks.html
+4
-2
templates/topic.html
templates/topic.html
+12
-6
No files found.
__pycache__/prediction.cpython-37.pyc
0 → 100644
View file @
851fb1d8
File added
main.py
View file @
851fb1d8
...
...
@@ -18,6 +18,9 @@ app = Starlette(debug=True)
credentials
=
service_account
.
Credentials
.
from_service_account_file
(
"./serviceKey.json"
,
scopes
=
scopes
)
authed_session
=
AuthorizedSession
(
credentials
)
@
app
.
route
(
'/auth'
)
async
def
show_index
(
request
):
return
templates
.
TemplateResponse
(
'index.html'
,
{
'request'
:
request
})
@
app
.
route
(
'/auth'
,
methods
=
[
"POST"
])
async
def
firebase_login
(
request
):
...
...
@@ -60,7 +63,7 @@ async def firebase_register(request):
try
:
message
=
json
.
loads
(
response
.
_content
)[
'error'
][
'message'
]
except
:
message
=
"Some error Occured.
"
message
=
'<div class="alert alert-danger" role="alert">'
+
"Some error Occured."
+
"</div>
"
return
templates
.
TemplateResponse
(
'register.html'
,
{
'request'
:
request
,
'err_msg'
:
message
})
else
:
message
=
"Successfully registered."
...
...
@@ -68,11 +71,13 @@ async def firebase_register(request):
@
app
.
route
(
'/'
)
async
def
login
(
request
):
return
templates
.
TemplateResponse
(
'login.html'
,
{
'request'
:
request
})
message
=
''
return
templates
.
TemplateResponse
(
'login.html'
,
{
'request'
:
request
,
'err_msg'
:
message
})
@
app
.
route
(
'/register'
)
async
def
login
(
request
):
return
templates
.
TemplateResponse
(
'register.html'
,
{
'request'
:
request
})
message
=
''
return
templates
.
TemplateResponse
(
'register.html'
,
{
'request'
:
request
,
'err_msg'
:
message
})
@
app
.
route
(
'/contribute'
)
async
def
contrbPage
(
request
):
...
...
templates/contribute.html
View file @
851fb1d8
...
...
@@ -16,7 +16,7 @@
<div
class=
"container"
>
<!-- navbar component from getbootstrap.com -->
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
style=
"margin-top: 1px"
>
<a
class=
"navbar-brand"
href=
"/
"
>
Evaluat
e
</a>
<a
class=
"navbar-brand"
href=
"/
auth"
>
Hom
e
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNavAltMarkup"
aria-controls=
"navbarNavAltMarkup"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
...
...
@@ -26,15 +26,17 @@
<a
class=
"nav-item nav-link"
href=
"/contribute"
>
Contribute
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"https://github.com/KartavyaKothari/Automated-essay-grading-UI"
>
About
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"#links"
></a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"/"
>
Logout
</a>
</div>
</div>
</nav>
<br
/>
<div
class=
"jumbotron"
>
<h1
class=
"display-4"
>
Add your essay to our existing corpus
</h1>
<p
class=
"lead"
>
This is a simple essay evaliation unit, an interface for calling essay evaluation model (ASAP)
</p>
<h1
class=
"display-4"
style=
"font-size:5vw;"
>
Add your essay to our existing corpus
</h1>
<p
class=
"lead"
style=
"font-size:1.2em;"
>
This is a simple essay evaliation unit, an interface for calling essay evaluation model (ASAP)
</p>
<hr
class=
"my-4"
>
<p>
<div
class=
"input-group"
>
...
...
templates/index.html
View file @
851fb1d8
...
...
@@ -16,7 +16,7 @@
<div
class=
"container"
>
<!-- navbar component from getbootstrap.com -->
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
style=
"margin-top: 1px"
>
<a
class=
"navbar-brand"
href=
"/"
>
Home
</a>
<a
class=
"navbar-brand"
href=
"/
auth
"
>
Home
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNavAltMarkup"
aria-controls=
"navbarNavAltMarkup"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
...
...
@@ -26,15 +26,18 @@
<a
class=
"nav-item nav-link"
href=
"/contribute"
>
Contribute
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"https://github.com/KartavyaKothari/Automated-essay-grading-UI"
>
About
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"#links"
></a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"/"
>
Logout
</a>
</div>
</div>
</nav>
<br
/>
<div
class=
"jumbotron"
>
<h1
class=
"display-4"
><i
class=
"fas fa-graduation-cap"
></i>
Automated essay grading
</h1>
<p
class=
"lead"
>
This is a simple essay evaliation unit, an interface for calling essay evaluation model (ASAP)
</p>
<h1
class=
"display-4"
style=
"font-size:5vw;"
><i
class=
"fas fa-graduation-cap"
></i>
Automated essay grading
</h1>
<p
class=
"lead"
style=
"font-size:1.2em;"
>
This is a simple essay evaliation unit, an interface for calling essay evaluation model (ASAP)
</p>
<hr
class=
"my-4"
>
<p>
<div
class=
"input-group"
>
...
...
templates/login.html
View file @
851fb1d8
...
...
@@ -26,16 +26,22 @@
<a
class=
"nav-item nav-link"
href=
"/contribute"
>
Contribute
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"https://github.com/KartavyaKothari/Automated-essay-grading-UI"
>
About
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"#links"
></a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"/register"
>
Register
</a>
</div>
</div>
<!-- <div class="navbar-nav"> -->
<!-- <a class="nav-item nav-link active" href="#">Home <span class="sr-only">(current)</span></a> -->
<!-- Internal page links -->
<!-- </div> -->
</nav>
<br
/>
<div
class=
"jumbotron"
>
<h1
class=
"display-4"
><i
class=
"fas fa-graduation-cap"
></i>
Automated essay grading (Login)
</h1>
<p
class=
"lead"
>
This is a simple essay evaliation unit, an interface for calling essay evaluation model (ASAP)
</p>
<h1
class=
"display-4"
style=
"font-size:5vw;"
><i
class=
"fas fa-graduation-cap"
></i>
Automated essay grading
</h1>
<p
class=
"lead"
style=
"font-size:1.2em"
>
This is a simple essay evaliation unit, an interface for calling essay evaluation model (ASAP)
</p>
<hr
class=
"my-4"
>
{{err_msg}}
<p>
<form
action=
"/auth"
method=
"post"
>
...
...
@@ -48,11 +54,8 @@
<label
for=
"exampleInputPassword1"
>
Password
</label>
<input
type=
"password"
name =
"password"
class=
"form-control"
id=
"exampleInputPassword1"
placeholder=
"Password"
>
</div>
<div
class=
"form-group form-check"
>
<input
type=
"checkbox"
class=
"form-check-input"
id=
"exampleCheck1"
>
<label
class=
"form-check-label"
for=
"exampleCheck1"
>
Check me out
</label>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
<button
type=
"submit"
class=
"btn btn-primary"
>
Login
</button>
</form>
...
...
templates/register.html
View file @
851fb1d8
...
...
@@ -26,16 +26,23 @@
<a
class=
"nav-item nav-link"
href=
"/contribute"
>
Contribute
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"https://github.com/KartavyaKothari/Automated-essay-grading-UI"
>
About
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"#links"
></a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"/"
>
Login
</a>
</div>
</div>
<!-- <div class="navbar-nav"> -->
<!-- <a class="nav-item nav-link active" href="#">Home <span class="sr-only">(current)</span></a> -->
<!-- Internal page links -->
<!-- </div> -->
</nav>
<br
/>
<div
class=
"jumbotron"
>
<h1
class=
"display-4"
><i
class=
"fas fa-graduation-cap"
></i>
Automated essay grading (Register)
</h1>
<p
class=
"lead"
>
This is a simple essay evaliation unit, an interface for calling essay evaluation model (ASAP)
</p>
<h1
class=
"display-4"
style=
"font-size:5vw;"
><i
class=
"fas fa-graduation-cap"
></i>
Automated essay grading
</h1>
<p
class=
"lead"
style=
"font-size:1.2em;"
>
This is a simple essay evaliation unit, an interface for calling essay evaluation model (ASAP)
</p>
<hr
class=
"my-4"
>
{{err_msg}}
<p>
<form
action=
"/registration"
method=
"post"
>
...
...
@@ -52,11 +59,7 @@
<label
for=
"userpasswordconfirm"
>
Confirm Password
</label>
<input
type=
"password"
name=
"pass2"
class=
"form-control"
id=
"userpasswordconfirm"
placeholder=
"Password"
>
</div>
<div
class=
"form-group form-check"
>
<input
type=
"checkbox"
class=
"form-check-input"
id=
"exampleCheck1"
>
<label
class=
"form-check-label"
for=
"exampleCheck1"
>
Check me out
</label>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
<button
type=
"submit"
class=
"btn btn-primary"
>
Register
</button>
</form>
...
...
templates/score.html
View file @
851fb1d8
...
...
@@ -16,7 +16,7 @@
<div
class=
"container"
>
<!-- navbar component from getbootstrap.com -->
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
style=
"margin-top: 1px"
>
<a
class=
"navbar-brand"
href=
"/
"
>
Evaluat
e
</a>
<a
class=
"navbar-brand"
href=
"/
auth"
>
Hom
e
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNavAltMarkup"
aria-controls=
"navbarNavAltMarkup"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
...
...
@@ -26,8 +26,10 @@
<a
class=
"nav-item nav-link"
href=
"/contribute"
>
Contribute
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"https://github.com/KartavyaKothari/Automated-essay-grading-UI"
>
About
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"#links"
></a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"/"
>
Logout
</a>
</div>
</div>
</nav>
<br
/>
...
...
templates/thanks.html
View file @
851fb1d8
...
...
@@ -16,7 +16,7 @@
<div
class=
"container"
>
<!-- navbar component from getbootstrap.com -->
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
style=
"margin-top: 1px"
>
<a
class=
"navbar-brand"
href=
"/
"
>
Evaluat
e
</a>
<a
class=
"navbar-brand"
href=
"/
auth"
>
Hom
e
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNavAltMarkup"
aria-controls=
"navbarNavAltMarkup"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
...
...
@@ -26,8 +26,10 @@
<a
class=
"nav-item nav-link"
href=
"/contribute"
>
Contribute
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"https://github.com/KartavyaKothari/Automated-essay-grading-UI"
>
About
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"#links"
></a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"/"
>
Logout
</a>
</div>
</div>
</nav>
<br
/>
...
...
templates/topic.html
View file @
851fb1d8
...
...
@@ -26,16 +26,22 @@
<a
class=
"nav-item nav-link"
href=
"/contribute"
>
Contribute
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"https://github.com/KartavyaKothari/Automated-essay-grading-UI"
>
About
</a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"#links"
></a>
<!-- Internal page links -->
<a
class=
"nav-item nav-link"
href=
"/"
>
Logout
</a>
</div>
</div>
</nav>
<br
/>
<div
class=
"jumbotron"
>
<p
class=
"lead"
>
{{topic}}
</p>
<br
/>
<table>
<!-- </div> -->
<table
class=
"table"
>
<thead
class=
""
>
<tr>
<!-- <th scope="col">#</th> -->
<th
scope=
"col"
>
Essays on {{topic}}
</th>
<th
scope=
"col"
>
Score
</th>
<!-- <th scope="col">Handle</th> -->
</tr>
</thead>
{% for e in essayResponse %}
<tr>
<td>
{{e['essay']}}
</td>
...
...
@@ -53,7 +59,7 @@
<p class="lead">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Assumenda asperiores tempore harum eveniet nostrum nobis numquam consectetur cupiditate! Alias quo, iure ipsam nesciunt similique aperiam quas accusantium cupiditate! Quibusdam, architecto!
</p> -->
<
/div
>
<
!-- </div> --
>
</div>
<!-- Optional JavaScript -->
...
...
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