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
57e81a49
Commit
57e81a49
authored
Oct 10, 2022
by
randi480
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor Changes
parent
82fa207c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
15 deletions
+6
-15
web-app/frontend/src/components/activities/mentalChronometryEval/coding/CodingContainer.jsx
...tivities/mentalChronometryEval/coding/CodingContainer.jsx
+1
-5
web-app/frontend/src/components/activities/mentalChronometryEval/letterPattern/LetterPatternContainer.jsx
...lChronometryEval/letterPattern/LetterPatternContainer.jsx
+1
-3
web-app/frontend/src/components/activities/mentalChronometryEval/letterPattern/LetterPatternDrawingPad.jsx
...ChronometryEval/letterPattern/LetterPatternDrawingPad.jsx
+2
-2
web-app/frontend/src/components/activities/mentalChronometryEval/pairCancerlation/PairCancerlationContainer.jsx
...ometryEval/pairCancerlation/PairCancerlationContainer.jsx
+2
-5
No files found.
web-app/frontend/src/components/activities/mentalChronometryEval/coding/CodingContainer.jsx
View file @
57e81a49
...
@@ -141,11 +141,7 @@ const CodingContainer = () => {
...
@@ -141,11 +141,7 @@ const CodingContainer = () => {
let
message
=
{
image
:
image
};
let
message
=
{
image
:
image
};
sigCanvas
.
current
.
clear
();
sigCanvas
.
current
.
clear
();
await
axios
await
API
.
post
(
"
predicthanddrwnshapes
"
,
JSON
.
stringify
(
message
))
.
post
(
"
http://127.0.0.1:5000/predicthanddrwnshapes
"
,
JSON
.
stringify
(
message
)
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
letterPatternANswers
.
push
(
res
.
data
.
prediction
);
letterPatternANswers
.
push
(
res
.
data
.
prediction
);
console
.
log
(
letterPatternANswers
);
console
.
log
(
letterPatternANswers
);
...
...
web-app/frontend/src/components/activities/mentalChronometryEval/letterPattern/LetterPatternContainer.jsx
View file @
57e81a49
...
@@ -107,8 +107,7 @@ const LetterPatternContainer = ({ nextActivity }) => {
...
@@ -107,8 +107,7 @@ const LetterPatternContainer = ({ nextActivity }) => {
let
message
=
{
image
:
image
};
let
message
=
{
image
:
image
};
sigCanvas
.
current
.
clear
();
sigCanvas
.
current
.
clear
();
await
axios
await
API
.
post
(
"
predictletters
"
,
JSON
.
stringify
(
message
))
.
post
(
"
http://127.0.0.1:5000/predictletters
"
,
JSON
.
stringify
(
message
))
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
letterPatternANswers
.
push
(
res
.
data
.
prediction
);
letterPatternANswers
.
push
(
res
.
data
.
prediction
);
console
.
log
(
letterPatternANswers
);
console
.
log
(
letterPatternANswers
);
...
@@ -168,7 +167,6 @@ const LetterPatternContainer = ({ nextActivity }) => {
...
@@ -168,7 +167,6 @@ const LetterPatternContainer = ({ nextActivity }) => {
<
SignaturePad
<
SignaturePad
backgroundColor=
"white"
backgroundColor=
"white"
ref=
{
sigCanvas
}
ref=
{
sigCanvas
}
canvasProps=
{
{
canvasProps=
{
{
className
:
"
border-2 border-black w-full h-full m-auto
"
,
className
:
"
border-2 border-black w-full h-full m-auto
"
,
}
}
}
}
...
...
web-app/frontend/src/components/activities/mentalChronometryEval/letterPattern/LetterPatternDrawingPad.jsx
View file @
57e81a49
...
@@ -2,6 +2,7 @@ import React, { useState, useRef } from "react";
...
@@ -2,6 +2,7 @@ import React, { useState, useRef } from "react";
import
axios
from
"
axios
"
;
import
axios
from
"
axios
"
;
import
"
./LetterPatternDrawingPad.css
"
;
import
"
./LetterPatternDrawingPad.css
"
;
import
SignaturePad
from
"
react-signature-canvas
"
;
import
SignaturePad
from
"
react-signature-canvas
"
;
import
API
from
"
../../../../config/api
"
;
const
LetterPatternDrawingPad
=
()
=>
{
const
LetterPatternDrawingPad
=
()
=>
{
const
sigCanvas
=
useRef
({});
const
sigCanvas
=
useRef
({});
...
@@ -23,8 +24,7 @@ const LetterPatternDrawingPad = () => {
...
@@ -23,8 +24,7 @@ const LetterPatternDrawingPad = () => {
let
message
=
{
image
:
image
};
let
message
=
{
image
:
image
};
console
.
log
(
image
);
console
.
log
(
image
);
await
axios
await
API
.
post
(
"
predictletters
"
,
JSON
.
stringify
(
message
))
.
post
(
"
http://127.0.0.1:5000/predictletters
"
,
JSON
.
stringify
(
message
))
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
alert
(
res
.
data
.
prediction
);
alert
(
res
.
data
.
prediction
);
console
.
log
(
res
);
console
.
log
(
res
);
...
...
web-app/frontend/src/components/activities/mentalChronometryEval/pairCancerlation/PairCancerlationContainer.jsx
View file @
57e81a49
import
React
,
{
useState
,
useEffect
}
from
"
react
"
;
import
React
,
{
useState
,
useEffect
}
from
"
react
"
;
import
ReactCrop
from
"
react-image-crop
"
;
import
ReactCrop
from
"
react-image-crop
"
;
import
"
react-image-crop/dist/ReactCrop.css
"
;
import
"
react-image-crop/dist/ReactCrop.css
"
;
import
API
from
"
../../../../config/api
"
;
import
PCB1
from
"
./img/PCB1.png
"
;
import
PCB1
from
"
./img/PCB1.png
"
;
import
PCB2
from
"
./img/PCB2.png
"
;
import
PCB2
from
"
./img/PCB2.png
"
;
import
PCB3
from
"
./img/PCB3.png
"
;
import
PCB3
from
"
./img/PCB3.png
"
;
...
@@ -109,11 +110,7 @@ const PairCancerlationContainer = () => {
...
@@ -109,11 +110,7 @@ const PairCancerlationContainer = () => {
let
message
=
{
image
:
imagetoPred
};
let
message
=
{
image
:
imagetoPred
};
await
axios
await
API
.
post
(
"
predictShapePattern
"
,
JSON
.
stringify
(
message
))
.
post
(
"
http://127.0.0.1:5000/predictShapePattern
"
,
JSON
.
stringify
(
message
)
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
for
(
let
i
=
0
;
i
<
res
.
data
.
prediction
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
res
.
data
.
prediction
.
length
;
i
++
)
{
predResult
.
push
(
res
.
data
.
prediction
);
predResult
.
push
(
res
.
data
.
prediction
);
...
...
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