Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-073
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-073
2022-073
Commits
7463ea5a
Commit
7463ea5a
authored
Nov 12, 2022
by
NilanDMeegoda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor attention fix
parent
ed2d0796
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
.gitignore
.gitignore
+1
-1
web-app/backend/controler.py
web-app/backend/controler.py
+1
-2
web-app/backend/server.py
web-app/backend/server.py
+1
-1
web-app/frontend/src/pages/attention_demo/attentionspan.jsx
web-app/frontend/src/pages/attention_demo/attentionspan.jsx
+4
-4
No files found.
.gitignore
View file @
7463ea5a
...
...
@@ -6,7 +6,7 @@ node_modules
#pycache & face exp model
web-app/backend/__pycache__/
web-app/backend/facialExp.h5
web-app/backend/
test_vids/
web-app/backend/
uploads/att.mp4
/.pnp
.pnp.js
...
...
web-app/backend/controler.py
View file @
7463ea5a
...
...
@@ -76,5 +76,4 @@ def captureImage(link,frameSkip):
if
__name__
==
"__main__"
:
scoreLst
=
captureImage
(
"C:/SLIIT/Final Research implementation/Backend/new model 2.0/Main Project code/uploads/test2.mp4"
,
10
)
print
(
scoreLst
)
print
(
"Controller working"
)
web-app/backend/server.py
View file @
7463ea5a
...
...
@@ -35,7 +35,7 @@ app.config['CORS_HEADERS'] = 'Content-Type'
# for prediction
@
app
.
route
(
'/
upload
'
,
methods
=
[
'POST'
])
@
app
.
route
(
'/
attentionPrediction
'
,
methods
=
[
'POST'
])
@
cross_origin
()
def
predictAttention
():
print
(
request
)
...
...
web-app/frontend/src/pages/attention_demo/attentionspan.jsx
View file @
7463ea5a
...
...
@@ -72,7 +72,7 @@ const AttentionSpan_screen = () => {
data
.
append
(
"
file
"
,
blob
);
data
.
append
(
"
filename
"
,
"
att.mp4
"
)
data
.
append
(
"
questionIndex
"
,
id
);
await
API
.
post
(
"
upload
"
,
data
,
{
await
API
.
post
(
"
attentionPrediction
"
,
data
,
{
headers
:
{
"
Access-Control-Allow-Origin
"
:
"
*
"
,
},
...
...
@@ -223,15 +223,15 @@ const AttentionSpan_screen = () => {
<>
<
p
>
Low level attention :
{
"
"
}
{
Math
.
round
(
attention
.
low_attention
*
100
)
/
100
}
{
Math
.
round
(
attention
.
low_attention
*
100
)
}
%
</
p
>
<
p
>
Mid level attention :
{
"
"
}
{
attention
.
mid_attention
*
100
}
{
Math
.
round
(
attention
.
mid_attention
*
100
)
}
%
</
p
>
<
p
>
High level attention :
{
"
"
}
{
attention
.
high_attention
*
100
}
{
Math
.
round
(
attention
.
high_attention
*
100
)
}
%
</
p
>
</>
)
}
...
...
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