Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-362
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-362
2023-362
Commits
5ce13979
Commit
5ce13979
authored
Oct 22, 2023
by
Nirmal M.D.S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main page
parent
bc83b602
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
202 additions
and
0 deletions
+202
-0
IT20074340/TaskAllocation/.idea/.gitignore
IT20074340/TaskAllocation/.idea/.gitignore
+3
-0
IT20074340/TaskAllocation/.idea/inspectionProfiles/profiles_settings.xml
...Allocation/.idea/inspectionProfiles/profiles_settings.xml
+6
-0
IT20074340/TaskAllocation/.idea/misc.xml
IT20074340/TaskAllocation/.idea/misc.xml
+7
-0
IT20074340/TaskAllocation/.idea/modules.xml
IT20074340/TaskAllocation/.idea/modules.xml
+8
-0
IT20074340/TaskAllocation/Sachintha/index.html
IT20074340/TaskAllocation/Sachintha/index.html
+118
-0
IT20074340/task.sql
IT20074340/task.sql
+60
-0
No files found.
IT20074340/TaskAllocation/.idea/.gitignore
0 → 100644
View file @
5ce13979
# Default ignored files
/shelf/
/workspace.xml
IT20074340/TaskAllocation/.idea/inspectionProfiles/profiles_settings.xml
0 → 100644
View file @
5ce13979
<component
name=
"InspectionProjectProfileManager"
>
<settings>
<option
name=
"USE_PROJECT_PROFILE"
value=
"false"
/>
<version
value=
"1.0"
/>
</settings>
</component>
\ No newline at end of file
IT20074340/TaskAllocation/.idea/misc.xml
0 → 100644
View file @
5ce13979
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.8 (2)"
project-jdk-type=
"Python SDK"
/>
<component
name=
"PyCharmProfessionalAdvertiser"
>
<option
name=
"shown"
value=
"true"
/>
</component>
</project>
\ No newline at end of file
IT20074340/TaskAllocation/.idea/modules.xml
0 → 100644
View file @
5ce13979
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectModuleManager"
>
<modules>
<module
fileurl=
"file://$PROJECT_DIR$/.idea/TaskAllocation.iml"
filepath=
"$PROJECT_DIR$/.idea/TaskAllocation.iml"
/>
</modules>
</component>
</project>
\ No newline at end of file
IT20074340/TaskAllocation/Sachintha/index.html
0 → 100644
View file @
5ce13979
<!DOCTYPE html>
<html>
<head>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin=
"anonymous"
>
<title>
Task Prediction Form
</title>
</head>
<style>
.predict-btn
{
background-image
:
linear-gradient
(
310deg
,
#cb0c9f
0%
,
#98ec2d
100%
);
text-transform
:
uppercase
;
border
:
#cb0c9f
}
h3
{
color
:
#cb0c9f
!important
:
}
.card
{
background
:
#fff
;
padding
:
20px
;
border-radius
:
3px
;
transition
:
transform
.2s
ease
;
box-shadow
:
0
20px
27px
0
rgba
(
0
,
0
,
0
,
0.05
);
border-radius
:
1rem
;
height
:
100%
;
}
</style>
<body>
<div
class=
"container card p-5 mt-5 mb-5"
>
<h3
style=
"color: #cb0c9f;text-align:center;text-transform: uppercase;"
class=
"mb-5 fw-bold"
>
Task Prediction
</h3>
<form
id=
"prediction-form"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<label
for=
"title"
>
Name:
</label>
</div>
<div
class=
"col-md-8"
>
<input
type=
"text"
class=
"form-control"
id=
"title"
name=
"title"
>
</div>
</div>
<div
class=
"row mt-4"
>
<div
class=
"col-md-4"
>
<label
for=
"description"
>
Description:
</label>
</div>
<div
class=
"col-md-8"
>
<textarea
style=
"height:150px"
class=
"form-control"
id=
"description"
name=
"description"
></textarea>
</div>
</div>
<input
class=
"btn btn-primary predict-btn mt-5 ms-auto me-auto"
type=
"submit"
value=
"Predict"
>
<div
class=
"fw-bold mt-5 fs-4 alert alert-warning text-center text-uppercase"
id=
"prediction-result"
></div>
</form>
</div>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
integrity=
"sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js"
integrity=
"sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF"
crossorigin=
"anonymous"
></script>
<script>
function
submitDataToServer
(
title
,
description
,
result
)
{
const
sql_data
=
{
title
:
title
,
description
:
description
,
level
:
result
};
console
.
log
(
JSON
.
stringify
(
sql_data
));
fetch
(
'
http://127.0.0.1:5002/submit_data
'
,
{
method
:
'
POST
'
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
},
body
:
JSON
.
stringify
(
sql_data
)
})
.
then
(
response
=>
response
.
json
())
.
then
(
result
=>
{
console
.
log
(
result
);
})
.
catch
(
error
=>
{
console
.
error
(
'
Error:
'
,
error
);
});
};
document
.
getElementById
(
"
prediction-form
"
).
addEventListener
(
"
submit
"
,
function
(
event
)
{
event
.
preventDefault
();
const
title
=
document
.
getElementById
(
"
title
"
).
value
;
const
description
=
document
.
getElementById
(
"
description
"
).
value
;
let
result
=
""
;
const
data
=
{
title
:
title
,
task_description
:
description
};
fetch
(
'
http://127.0.0.1:5000/predict
'
,
{
method
:
'
POST
'
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
},
body
:
JSON
.
stringify
(
data
)
})
.
then
(
response
=>
response
.
json
())
.
then
(
result
=>
{
const
predictionResult
=
result
.
prediction
;
const
resultDiv
=
document
.
getElementById
(
"
prediction-result
"
);
resultDiv
.
innerHTML
=
`Predicted task:
${
predictionResult
}
`
;
console
.
log
(
`Predicted task:
${
predictionResult
}
`
);
// Call the function to submit data to the server after receiving prediction
submitDataToServer
(
title
,
description
,
predictionResult
);
})
.
catch
(
error
=>
{
console
.
error
(
'
Error:
'
,
error
);
});
});
</script>
</body>
</html>
IT20074340/task.sql
0 → 100644
View file @
5ce13979
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 03, 2023 at 07:59 AM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.2
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
START
TRANSACTION
;
SET
time_zone
=
"+00:00"
;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */
;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */
;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */
;
/*!40101 SET NAMES utf8mb4 */
;
--
-- Database: `sachintha`
--
-- --------------------------------------------------------
--
-- Table structure for table `task`
--
CREATE
TABLE
`task`
(
`id`
int
(
100
)
NOT
NULL
,
`title`
varchar
(
100
)
NOT
NULL
,
`description`
varchar
(
1000
)
NOT
NULL
,
`level`
varchar
(
20
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `task`
--
ALTER
TABLE
`task`
ADD
PRIMARY
KEY
(
`id`
);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `task`
--
ALTER
TABLE
`task`
MODIFY
`id`
int
(
100
)
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
4
;
COMMIT
;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */
;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */
;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */
;
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