Commit 7463ea5a authored by NilanDMeegoda's avatar NilanDMeegoda

minor attention fix

parent ed2d0796
......@@ -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
......
......@@ -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")
......@@ -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)
......
......@@ -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>
</>
)}
......
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