Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-029
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
2023-029
2023-029
Commits
2d00907a
Commit
2d00907a
authored
Sep 02, 2023
by
janithgamage1.ed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
desc : update project
parent
e3c48555
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
4 deletions
+114
-4
Project/Backend/Server_Node/controllers/marksCalculator.controller.js
...end/Server_Node/controllers/marksCalculator.controller.js
+0
-1
Project/Frontend/SignConnectPlus/src/store/reducers/index.ts
Project/Frontend/SignConnectPlus/src/store/reducers/index.ts
+3
-1
Project/Frontend/SignConnectPlus/src/store/reducers/marksCalculator.ts
...end/SignConnectPlus/src/store/reducers/marksCalculator.ts
+93
-0
Project/Frontend/SignConnectPlus/src/types/marksCalculator.ts
...ect/Frontend/SignConnectPlus/src/types/marksCalculator.ts
+18
-0
README.md
README.md
+0
-2
No files found.
Project/Backend/Server_Node/controllers/marksCalculator.controller.js
View file @
2d00907a
import
{
exec
}
from
"
child_process
"
;
import
multer
from
"
multer
"
export
const
marksCalculator
=
async
(
req
,
res
)
=>
{
const
imageData
=
req
.
file
.
buffer
.
toString
(
'
base64
'
);
...
...
Project/Frontend/SignConnectPlus/src/store/reducers/index.ts
View file @
2d00907a
...
...
@@ -10,6 +10,7 @@ import chat from './chat';
import
ingredient
from
'
./ingredient
'
;
import
invoice
from
'
./invoice
'
;
import
kanban
from
'
./kanban
'
;
import
marksCalculator
from
'
./marksCalculator
'
;
import
menu
from
'
./menu
'
;
import
nutrition
from
'
./nutrition
'
;
import
productReducer
from
'
./product
'
;
...
...
@@ -37,7 +38,8 @@ const reducers = combineReducers({
invoice
,
nutrition
,
ingredient
,
subscription
subscription
,
marksCalculator
});
export
default
reducers
;
Project/Frontend/SignConnectPlus/src/store/reducers/marksCalculator.ts
0 → 100644
View file @
2d00907a
// third-party
import
{
createSlice
}
from
'
@reduxjs/toolkit
'
;
// project imports
import
{
axiosServices
}
from
'
utils/axios
'
;
import
{
dispatch
}
from
'
../index
'
;
// types
import
{
DefaultRootStateProps
}
from
'
types/marksCalculator
'
;
// ----------------------------------------------------------------------
const
initialState
:
DefaultRootStateProps
[
'
marksCalculator
'
]
=
{
error
:
null
,
success
:
null
,
marksCalculator
:
null
,
isLoading
:
false
};
const
slice
=
createSlice
({
name
:
'
marksCalculator
'
,
initialState
,
reducers
:
{
// TO INITIAL STATE
hasInitialState
(
state
)
{
state
.
error
=
null
;
state
.
success
=
null
;
state
.
isLoading
=
false
;
},
// HAS ERROR
hasError
(
state
,
action
)
{
state
.
error
=
action
.
payload
;
},
startLoading
(
state
)
{
state
.
isLoading
=
true
;
},
finishLoading
(
state
)
{
state
.
isLoading
=
false
;
},
// POST USER
marksCalculatorSuccess
(
state
,
action
)
{
state
.
marksCalculator
=
action
.
payload
.
result
;
state
.
success
=
"
Marks Calculated Successfully.
"
},
}
});
// Reducer
export
default
slice
.
reducer
;
// ----------------------------------------------------------------------
/**
* TO INITIAL STATE
* @returns
*/
export
function
toInitialState
()
{
return
async
()
=>
{
dispatch
(
slice
.
actions
.
hasInitialState
())
}
}
/**
* POST Marks Calculator
* @param curriculumIndex
* @param tutorialIndex
* @param imageData
* @param targetClass
* @returns
*/
export
function
marksCalculator
(
curriculumIndex
:
number
,
tutorialIndex
:
number
,
imageData
:
any
,
targetClass
:
string
)
{
return
async
()
=>
{
dispatch
(
slice
.
actions
.
startLoading
());
try
{
// Construct the request body as needed (e.g., for formData)
const
formData
=
new
FormData
();
formData
.
append
(
'
image
'
,
imageData
);
formData
.
append
(
'
class
'
,
targetClass
);
const
response
=
await
axiosServices
.
post
(
`/marks-calculator/curriculum/
${
curriculumIndex
}
/tutorial/
${
tutorialIndex
}
`
,
formData
);
dispatch
(
slice
.
actions
.
marksCalculatorSuccess
(
response
.
data
));
}
catch
(
error
)
{
dispatch
(
slice
.
actions
.
hasError
(
error
));
}
finally
{
dispatch
(
slice
.
actions
.
finishLoading
());
}
};
};
Project/Frontend/SignConnectPlus/src/types/marksCalculator.ts
0 → 100644
View file @
2d00907a
// Marks Calculator Type
export
type
MarksCalculator
=
{
predicted_class_name
:
string
,
confidence
:
string
,
status
:
string
};
export
interface
MarksCalculatorProps
{
marksCalculator
:
MarksCalculator
|
null
;
error
:
object
|
string
|
null
;
success
:
object
|
string
|
null
;
isLoading
:
boolean
}
export
interface
DefaultRootStateProps
{
marksCalculator
:
MarksCalculatorProps
;
}
\ No newline at end of file
README.md
View file @
2d00907a
# Project ID: 2023-029
### test
# Project Name: “Sign Language Translation with emotional base multi model,3D Avatar and Adaptive Learning.”
## Main Objective
...
...
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