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
07e69ef7
Commit
07e69ef7
authored
Oct 10, 2022
by
kulvinu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes
parent
5422bd2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
web-app/backend/server.py
web-app/backend/server.py
+26
-0
No files found.
web-app/backend/server.py
View file @
07e69ef7
...
...
@@ -382,6 +382,32 @@ def mentalChromScores():
'status'
:
'MentalCrom scores are added to the system successfully!'
,
})
# Knowledge IQ evaluation
@
app
.
route
(
'/predictKnowledgeIq'
,
methods
=
[
'POST'
,
'GET'
])
@
cross_origin
()
def
predictKnowledgeIq
():
if
request
.
method
==
'POST'
:
file
=
request
.
files
.
get
(
'file'
)
questionIndex
=
request
.
form
.
get
(
'questionIndex'
)
print
(
questionIndex
)
if
file
is
None
or
file
.
filename
==
""
:
return
jsonify
({
'error: no file'
})
try
:
file
.
save
(
"./"
+
file
.
filename
)
prediction
=
transform_audio
(
file
.
filename
)
data
=
{
'prediction'
:
prediction
}
db
.
db
[
'knowledgeIQScore'
]
.
insert_one
({
"activityName"
:
"Colour Numbers"
,
"questionIndex"
:
questionIndex
,
"transcription"
:
prediction
,
})
return
jsonify
(
data
)
except
:
return
jsonify
({
'error: Error during pipeline execution'
})
return
jsonify
({
'result: test'
})
# @app.route("/testDB")
# def test():
...
...
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