abhicodes commited on
Commit
39f528e
·
1 Parent(s): bb42a1d

Upload 25 files

Browse files
MultinomialNB stemmed classifier.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdb70dd9c51af0e465da59fe391a304f01d380b55820f8c09cd5cb62896c8800
3
+ size 74677
SVM classifier.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:965f1c7d0d203edda0c5c1cfee5a4e6e6ea12e55ec5572aa8f8985d0f484b7fd
3
+ size 86038
SVM stemmed classifier.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3518cd5ea64f5b753db3cd94ddc94c9539713ac987d97be6f3110a19617f1ff8
3
+ size 59367
acdameic_details.html ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Document</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
8
+
9
+ <style>
10
+ body {
11
+ margin: 0;
12
+ padding: 0;
13
+ font-family: Arial, sans-serif;
14
+ background-color: #bfd8e9; /* Replace with your background color */
15
+ background-size: cover;
16
+ background-repeat: no-repeat;
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ height: 100vh;
21
+
22
+ }
23
+
24
+ .navbar {
25
+ display: flex;
26
+ justify-content: space-between;
27
+ align-items: center;
28
+ background-color: rgb(6, 6, 65); /* Semi-transparent black background */
29
+ padding: 15px 10px;
30
+ position: fixed;
31
+ top: 0;
32
+ width: 100%;
33
+ height: 10%;
34
+ z-index: 1000; /* Ensure the navbar is above other content */
35
+ }
36
+
37
+ .logo {
38
+ color: #fff;
39
+ font-size: 30px;
40
+ font-weight: bold;
41
+ text-decoration: none;
42
+ margin-left: 50px;
43
+ }
44
+
45
+ .icons {
46
+ display: flex;
47
+ gap: 20px;
48
+ }
49
+
50
+ .icons a {
51
+ display: flex;
52
+ align-items: center;
53
+ color: #fff;
54
+ text-decoration: none;
55
+ font-size: 18px;
56
+ transition: color 0.3s ease-in-out;
57
+ }
58
+
59
+ .icons a:hover {
60
+ color: #3498db;
61
+ }
62
+
63
+ .icon-img {
64
+ width: 50px;
65
+ height: 50px;
66
+ margin-right: 100px;
67
+ }
68
+ .main-content {
69
+ margin-top: 70px;
70
+ display: flex;
71
+ width: 90%;
72
+ justify-content: center;
73
+ align-items: center;
74
+
75
+ margin-top: 70px;
76
+ /*background-color: rgba(255, 255, 255, 0.5);
77
+ border-radius: 10px;
78
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);*/
79
+ }
80
+
81
+ .image-section {
82
+ flex: 1;
83
+ padding: 10px;
84
+ text-align: center;
85
+ }
86
+
87
+ .image-section img {
88
+ max-width: 100%;
89
+
90
+ height: auto;
91
+ }
92
+
93
+ .card-section {
94
+ background-color: rgba(255, 255, 255, 0.5);
95
+ border-radius: 10px;
96
+ text-align: center;
97
+ max-width: 910px;
98
+ margin-top: 20px;
99
+ padding: 50px;
100
+ flex: 1;
101
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
102
+ overflow: auto;
103
+ max-height: 990px;
104
+ }
105
+
106
+ ::-webkit-scrollbar {
107
+ width: 6px;
108
+ }
109
+
110
+ ::-webkit-scrollbar-thumb {
111
+ background-color: #3498db;
112
+ border-radius: 4px;
113
+ }
114
+ ::-webkit-scrollbar-track {
115
+ background-color: rgba(0, 0, 0, 0.1);
116
+ }
117
+ .card-section h1 {
118
+ font-size: 25px;
119
+ margin-bottom: 10px;
120
+ }
121
+
122
+ .card-section h2 {
123
+ font-size: 24px;
124
+ margin-bottom: 20px;
125
+ }
126
+
127
+ .form-group {
128
+ margin: 50px 0;
129
+ text-align: left;
130
+ }
131
+
132
+ .form-group label {
133
+ display: block;
134
+ font-weight: bold;
135
+ font-size: 22px;
136
+ margin-bottom: 15px;
137
+ }
138
+
139
+ .form-group input,
140
+ .form-group select {
141
+ width: 86%;
142
+ padding: 25px;
143
+ border: 1px solid #ccc;
144
+ border-radius: 5px;
145
+ background-color: #f8f8f8; /* Light gray background */
146
+ transition: border-color 0.3s ease-in-out, background-color 0.3s ease-in-out;
147
+
148
+ }
149
+
150
+ input::-webkit-outer-spin-button,
151
+ input::-webkit-inner-spin-button {
152
+ -webkit-appearance: none;
153
+ margin: 0;
154
+ }
155
+ .form-group input:focus,
156
+ .form-group select:focus {
157
+ border-color: #3498db; /* Blue border color on focus */
158
+ background-color: #fff; /* White background on focus */
159
+ }
160
+
161
+ .card-section button {
162
+ background-color: #3498db;
163
+ color: #fff;
164
+ padding: 10px 50px;
165
+ font-size: 25px;
166
+ border: none;
167
+ border-radius: 5px;
168
+ cursor: pointer;
169
+ transition: background-color 0.3s ease-in-out;
170
+ }
171
+ #marksObtained,#totalMarks,#sgpa{
172
+ font-size: 20px;
173
+ }
174
+ #result,#backlogs,#subjectPreferences,#subjectPreference3,#subjectPreference2{
175
+ width: 90%;
176
+ padding: 20px;
177
+ font-size: 20px;
178
+ }
179
+ .subject-preferences {
180
+ text-align: left;
181
+ }
182
+
183
+ .subject-preferences label {
184
+ font-weight: bold;
185
+ margin-top: 15px;
186
+ display: block;
187
+ }
188
+
189
+ /* Additional Styling
190
+ .container {
191
+ display: flex;
192
+ flex-direction: column;
193
+ align-items: center;
194
+ }
195
+
196
+ .form-group select {
197
+ width: 100%;
198
+ }*/
199
+ .card-section button:hover {
200
+ background-color: #2980b9; /* Darker blue color on hover */
201
+ }
202
+
203
+ @media (max-width: 768px) {
204
+ .main-content {
205
+ margin-top: 30px;
206
+ }
207
+
208
+ .image-section img {
209
+ max-width: 100%;
210
+ }
211
+ }
212
+
213
+ /* Mobile styles */
214
+ @media (max-width: 480px) {
215
+ .main-content {
216
+ flex-direction: column;
217
+ align-items: flex-start;
218
+ }
219
+ }
220
+ @media (max-width: 768px) {
221
+ .navbar {
222
+ padding: 10px;
223
+ height: auto;
224
+ }
225
+
226
+ .logo {
227
+ margin-left: 10px;
228
+ }
229
+
230
+ .icons {
231
+ gap: 1px;
232
+ margin-right: 10px;
233
+ }
234
+
235
+ .icon-img {
236
+ width: 20px;
237
+ height: 20px;
238
+ }
239
+ }
240
+
241
+
242
+ </style>
243
+ </head>
244
+ <body>
245
+
246
+
247
+ <div class="navbar">
248
+ <div class="logo">EASA</div>
249
+ <div class="icons">
250
+ <a href="#">
251
+ <img src="home.png" alt="Home" class="icon-img">
252
+ </a>
253
+ <a href="#">
254
+ <img src="data-report.png" alt="Dashboard" class="icon-img">
255
+ </a>
256
+ <a href="#">
257
+ <img src="comment.png" alt="Chats" class="icon-img">
258
+ </a>
259
+ <a href="#">
260
+ <img src="notification.png" alt="Doubts" class="icon-img">
261
+ </a>
262
+ </div>
263
+ </div>
264
+ <div class="main-content">
265
+
266
+ <div class="card-section">
267
+ <h1>Student Details</h1>
268
+ <h2>Fill the details correctly</h2>
269
+ <div class="container">
270
+ <form method="POST" action="" name="submit-to-google-sheet">
271
+ <div class="form-group">
272
+ <label for="fullname">Full Name</label>
273
+ <input type="text" id="fullname" name="Name of student" placeholder="Enter your full name">
274
+ </div>
275
+ <div class="form-group">
276
+ <label for="semester">Semester</label>
277
+ <!-- <input type="text" id="semester" name="semester" placeholder="Enter your semester"> -->
278
+ <select id="semester" name="semester">
279
+ <option>Select your semester</option>
280
+ <option value="6">6</option>
281
+ <option value="7">7</option>
282
+ </select>
283
+ </div>
284
+ <div class="form-group">
285
+ <label for="enrollment">Enrollment Number</label>
286
+ <input type="number" id="enrollment" name="Enrollment no. Number" placeholder="Enter your enrollment number">
287
+ </div>
288
+ <div class="form-group">
289
+ <label for="totalMarks">Total Marks</label>
290
+ <input type="number" id="totalMarks" name="Total marks of 5th sem" placeholder="Enter total marks">
291
+ </div>
292
+ <div class="form-group">
293
+ <label for="marksObtained">Marks Obtained</label>
294
+ <input type="number" id="marksObtained" name="Marks obtained by student in 5th sem" placeholder="Enter marks obtained">
295
+ </div>
296
+
297
+ <div class="form-group">
298
+ <label for="sgpa">SGPA</label>
299
+ <input type="decimal" id="sgpa" name="SGPA of 5th Sem ( If Fail write zero)" placeholder="Enter SGPA">
300
+ </div>
301
+ <div class="form-group">
302
+ <label for="result">Result</label>
303
+ <select id="result" name="result">
304
+ <option value="pass">Pass</option>
305
+ <option value="fail">Fail</option>
306
+ </select>
307
+ </div>
308
+ <div class="form-group">
309
+ <label for="backlogs">No of Backlogs</label>
310
+ <select id="backlogs" name="backlogs">
311
+ <option value="0">0</option>
312
+ <option value="1">1</option>
313
+ <option value="2">2</option>
314
+ <option value="3">3</option>
315
+ <option value="4">4</option>
316
+ <option value="5">5</option>
317
+ </select>
318
+ </div>
319
+ <div class="form-group">
320
+ <label for="">Branch</label>
321
+ <select name="b1" id="branch">
322
+ <option value="">-- Choose Branch --</option>
323
+ <option value="cse"> Computer Science and Engineering </option>
324
+ <option value="etc"> Electronics and Telecomunicaton Engineering </option>
325
+ <option value="ee"> Electrical Engineering </option>
326
+ <option value="me"> Mechanical Engineering </option>
327
+ <option value="ce"> Civil Engineering </option>
328
+ </select>
329
+ </div>
330
+ <div class="form-group">
331
+ <label for="">Subject Preference 1</label>
332
+ <select name="sp1" id="sp1"></select>
333
+ </div>
334
+
335
+ <div class="form-group">
336
+ <label for="">Subject Preference 2</label>
337
+ <select name="sp2" id="sp2"></select>
338
+ </div>
339
+
340
+ <div class="form-group">
341
+ <label for="">Subject Preference 3</label>
342
+ <select name="sp3" id="sp3"></select>
343
+ </div>
344
+
345
+ <button onclick="fun()" type="submit">Submit</button>
346
+ </form>
347
+ </div>
348
+ </div>
349
+ </div>
350
+ </div>
351
+
352
+ <script>
353
+ const scriptURL = 'https://script.google.com/macros/s/AKfycbyFa9t-GhIHG2A6E4hXoQeYyhQc_1kdV2jYJhiGICRn9O7gCkQrJgaoFS6f7iftlDwkzg/exec'
354
+ const form = document.forms['submit-to-google-sheet']
355
+
356
+ function confirmAndSubmit() {
357
+ const confirmation = window.confirm("Confirm if you'd like to submit this information!");
358
+
359
+ if (confirmation) {
360
+ fetch(scriptURL, { method: 'POST', body: new FormData(form) })
361
+ .then(response => {
362
+ console.log('Success!', response);
363
+ // Redirect to the home page after successful submission
364
+ window.location.href = 'home_page.html'; // Replace 'home.html' with your actual home page URL
365
+ })
366
+ .catch(error => console.error('Error!', error.message));
367
+ }
368
+ }
369
+
370
+ form.addEventListener('submit', e => {
371
+ e.preventDefault();
372
+ confirmAndSubmit();
373
+ });
374
+
375
+
376
+ let branch = document.getElementById("branch");
377
+ let semester = document.getElementById("semester");
378
+ let sp1 = document.getElementById("sp1");
379
+ let sp2 = document.getElementById("sp2");
380
+ let sp3 = document.getElementById("sp3");
381
+
382
+ const multipleOptions = {
383
+ cse_6: ['Basics of Civil Engineering', 'PLDC and SCADA Systems', 'Solar PV system', 'Consumer Electronics'],
384
+ etc_6: ['Basics of Civil Engineering', 'PLDC and SCADA Systems', 'Solar PV system', 'Linux Fundamental', 'Android Application Development'],
385
+ ee_6: ['Basics of Civil Engineering', 'Consumer Electronics', 'Linux Fundamental', 'Android Application Development'],
386
+ ce_6: ['PLDC and SCADA Systems', 'Solar PV system', 'Consumer Electronics', 'Linux Fundamental', 'Android Application Development'],
387
+ cse_7: ['Power Plant Engineering', 'Control system' ,'Renewable energy resources', 'Civil Engineering Material', 'Mechatronics', 'Bio-Engineering'],
388
+ me_7: ['Power Plant Engineering', 'Control system','Java','Python','Civil Engineering Material', 'Mechatronics', 'Bio-Engineering'],
389
+ ee_7: ['Renewable energy resources', 'Civil Engineering Material', 'Mechatronics', 'Bio-Engineering', 'Java','Python'],
390
+ etc_7: ['Power Plant Engineering', 'Control system','Renewable energy resources', 'Civil Engineering Material','Java','Python'],
391
+ ce_7: ['Java','Python', 'Renewable energy resources', 'Control system', 'Power Plant Engineering', 'Control system','Mechatronics', 'Bio-Engineering'],
392
+ };
393
+
394
+ function updatesp1() {
395
+ sp1.innerHTML = '';
396
+
397
+ // Generate new options based on the selections
398
+ const selectedFirst = branch.value;
399
+ const selectedSecond = semester.value;
400
+ const combinedSelection = selectedFirst + '_' + selectedSecond;
401
+ if (multipleOptions.hasOwnProperty(combinedSelection)) {
402
+ multipleOptions[combinedSelection].forEach(optionText => {
403
+ const option = document.createElement('option');
404
+ option.value = optionText;
405
+ option.textContent = optionText;
406
+ sp1.appendChild(option);
407
+ });
408
+ }
409
+ }
410
+
411
+ branch.addEventListener('change', updatesp1);
412
+ semester.addEventListener('change', updatesp1);
413
+
414
+ updatesp1();
415
+
416
+ function updatesp2() {
417
+ sp2.innerHTML = '';
418
+
419
+ // Generate new options based on the selections
420
+ const selectedFirst = branch.value;
421
+ const selectedSecond = semester.value;
422
+ const combinedSelection = selectedFirst + '_' + selectedSecond;
423
+
424
+ if (multipleOptions.hasOwnProperty(combinedSelection)) {
425
+ multipleOptions[combinedSelection].forEach(optionText => {
426
+ const option = document.createElement('option');
427
+ option.value = optionText;
428
+ option.textContent = optionText;
429
+ sp2.appendChild(option);
430
+ });
431
+ }
432
+ }
433
+
434
+ branch.addEventListener('change', updatesp2);
435
+ semester.addEventListener('change', updatesp2);
436
+
437
+ updatesp2();
438
+
439
+ function updatesp3() {
440
+ sp3.innerHTML = '';
441
+
442
+ // Generate new options based on the selections
443
+ const selectedFirst = branch.value;
444
+ const selectedSecond = semester.value;
445
+ const combinedSelection = selectedFirst + '_' + selectedSecond;
446
+
447
+ if (multipleOptions.hasOwnProperty(combinedSelection)) {
448
+ multipleOptions[combinedSelection].forEach(optionText => {
449
+ const option = document.createElement('option');
450
+ option.value = optionText;
451
+ option.textContent = optionText;
452
+ sp3.appendChild(option);
453
+ });
454
+ }
455
+ }
456
+
457
+ branch.addEventListener('change', updatesp3);
458
+ semester.addEventListener('change', updatesp3);
459
+
460
+ updatesp3();
461
+
462
+ </script>
463
+
464
+ </body>
465
+ </html>
admin elective.html ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Document</title>
7
+ <style>
8
+ body {
9
+ margin: 0;
10
+ padding: 0;
11
+ font-family: Arial, sans-serif;
12
+ background-color: #bfd8e9; /* Replace with your background color */
13
+ background-size: cover;
14
+ background-repeat: no-repeat;
15
+ display: flex;
16
+ justify-content: center;
17
+ align-items: center;
18
+ height: 100vh;
19
+ }
20
+ .container{
21
+ display: flex;
22
+ }
23
+
24
+ /*.navbar {
25
+ display: flex;
26
+ justify-content: space-between;
27
+ align-items: center;
28
+ background-color: rgb(6, 6, 65); /* Semi-transparent black background
29
+ padding: 15px 20px;
30
+ position: fixed;
31
+ top: 0;
32
+ width: 100%;
33
+ height: 10%;
34
+ z-index: 1000; /* Ensure the navbar is above other content
35
+ }*/
36
+ .sidebar {
37
+ background-color: rgb(6, 6, 65);
38
+ width: 15%;
39
+ height: 100%;
40
+ position: fixed;
41
+ top: 0;
42
+ left: 0;
43
+ display: flex;
44
+ flex-direction: column;
45
+ align-items: center;
46
+ padding: 20px 0;
47
+ overflow: hidden;
48
+ }
49
+
50
+ .logo {
51
+ color: #fff;
52
+ font-size: 30px;
53
+ font-weight: bold;
54
+ text-decoration: none;
55
+ padding-top: 50px;
56
+ margin-left: 10px;
57
+ margin-bottom: 50px;
58
+ }
59
+
60
+ .icons {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 5px;
64
+ margin-left: 20px;
65
+
66
+
67
+ }
68
+
69
+ .icons a {
70
+ display: flex;
71
+ align-items: center;
72
+ color: #fff;
73
+ text-decoration: none;
74
+ font-size: 15px;
75
+ transition: color 0.3s ease-in-out;
76
+ padding: 2px;
77
+
78
+ }
79
+
80
+ .icons a:hover {
81
+ color: #3498db;
82
+ background-color: rgba(155, 155, 155, 0.2);
83
+ border-radius: 10px;
84
+ border: 1px solid rgb(147, 146, 146);
85
+
86
+ }
87
+
88
+ .icon-img {
89
+ width: 30px;
90
+ height: 30px;
91
+ margin-right: 20px;
92
+ }
93
+ .icons a span{
94
+ padding-left: 2px;
95
+
96
+ }
97
+ /* ... Previous CSS code ... */
98
+
99
+ .main-content {
100
+ display: flex;
101
+ flex-direction: column;
102
+ align-items: center;
103
+ margin-left: 20%;
104
+ margin-top: 10px;
105
+ }
106
+
107
+ .admin-heading {
108
+ font-size: 46px;
109
+ margin-top: 12px;
110
+ text-align: center;
111
+
112
+ }
113
+
114
+ .form-group {
115
+ display: flex;
116
+ align-items: center;
117
+ }
118
+
119
+ .form-group label {
120
+ flex:1;
121
+ text-align: center;
122
+ padding-left: 25px;
123
+ margin-right: 20px;
124
+ justify-content: center;
125
+ align-items: center;
126
+ font-size: 20px;
127
+ }
128
+
129
+ .form-group input {
130
+
131
+ width: 100px;
132
+ padding: 10px;
133
+ border: 1px solid #ccc;
134
+ border-radius: 5px;
135
+ padding-left: 50px;
136
+ }
137
+
138
+ .open-elective-heading {
139
+ font-size: 26px;
140
+ margin-top: 60px;
141
+ margin-bottom: 20px;
142
+ }
143
+
144
+ .card {
145
+ background-color: rgba(255, 255, 255, 0.4);
146
+ border-radius: 10px;
147
+ padding: 50px;
148
+ width: 100%;
149
+ max-width: 900px;
150
+ margin-bottom: 10px;
151
+ text-align: center;
152
+ }
153
+ .card2 {
154
+ background-color: rgba(255, 255, 255, 0.2);
155
+ border-radius: 10px;
156
+ border: 1px solid rgb(143, 142, 142);
157
+ padding: 40px;
158
+ width: 100%;
159
+ max-width: 800px;
160
+ padding-left: 10px;
161
+ text-align: center;
162
+ justify-content: center;
163
+ }
164
+
165
+ .card-form-group {
166
+ display: flex;
167
+ padding: 20px;
168
+ align-items: center;
169
+ justify-content: space-between;
170
+ margin-bottom: 10px;
171
+ margin-right:50px;
172
+ }
173
+
174
+ .card-form-group label {
175
+ font-size: 15px;
176
+ padding: 5px;
177
+ justify-content: space-between;
178
+ text-align: left;
179
+ padding-left: 30px;
180
+ white-space: nowrap;
181
+ }
182
+
183
+ .card-form-group input {
184
+ width: 80px;
185
+ height: 20px;
186
+ padding: 5px;
187
+ border: 1px solid #ccc;
188
+ border-radius: 5px;
189
+
190
+ }
191
+ </style>
192
+ </head>
193
+ <body>
194
+ <div class="container">
195
+ <div class="sidebar">
196
+ <div class="logo">EASA</div>
197
+ <div class="icons">
198
+ <a href="#">
199
+ <img src="home.png" alt="Home" class="icon-img"><span>Home</span>
200
+ </a>
201
+ <a href="http://192.168.7.147:5978/login">
202
+ <img src="data-report.png" alt="Dashboard" class="icon-img">Dashboard
203
+ </a>
204
+ <a href="https://docs.google.com/spreadsheets/d/1eNJ6_itReRGp8-UcBirOKV7BNvHfxKe0L8T7XFBWlVQ/edit#gid=0">
205
+ <img src="comment.png" alt="Chats" class="icon-img">Check Entered Data
206
+ </a>
207
+ <a href="https://docs.google.com/spreadsheets/d/1eNJ6_itReRGp8-UcBirOKV7BNvHfxKe0L8T7XFBWlVQ/edit#gid=2039361118">
208
+ <img src="notification.png" alt="Doubts" class="icon-img">Subjects Allocated
209
+ </a>
210
+ </div>
211
+ </div>
212
+
213
+ <div class="main-content">
214
+ <div class="card">
215
+ <h1 class="admin-heading">Welcome to Admin Page</h1>
216
+ <div class="form-group">
217
+ <form method="POST" action="" name="submit-to-google-sheet">
218
+ <label for="name">Name:</label>
219
+ <input type="text" id="name" name="name">
220
+ <label for="branch">Branch:</label>
221
+ <input type="text" id="branch" name="branch">
222
+ <label for="branch">Semester:</label>
223
+ <input type="number" id="sem" name="sem"> </div>
224
+ <h1 class="open-elective-heading">Open Elective Subjects</h1>
225
+ <div class="card2">
226
+ <div class="card-form-group">
227
+ <label for="subject1">Subject 1:</label>
228
+ <input type="text" id="subject1" name="subject1">
229
+ <label for="maxCapacity">Max Capacity:</label>
230
+ <input type="number" id="maxCapacity1" name="maxCapacity1">
231
+ <label for="minCapacity">Min Capacity:</label>
232
+ <input type="number" id="minCapacity1" name="minCapacity1">
233
+ </div>
234
+
235
+ <div class="card-form-group">
236
+ <label for="subject1">Subject 2:</label>
237
+ <input type="text" id="subject2" name="subject2">
238
+ <label for="maxCapacity">Max Capacity:</label>
239
+ <input type="number" id="maxCapacity2" name="maxCapacity2">
240
+ <label for="minCapacity">Min Capacity:</label>
241
+ <input type="number" id="minCapacity2" name="minCapacity2">
242
+ </div>
243
+
244
+ <div class="card-form-group">
245
+ <label for="subject1">Subject 3:</label>
246
+ <input type="text" id="subject3" name="subject3">
247
+ <label for="maxCapacity">Max Capacity:</label>
248
+ <input type="number" id="maxCapacity3" name="maxCapacity3">
249
+ <label for="minCapacity">Min Capacity:</label>
250
+ <input type="number" id="minCapacity3" name="minCapacity3">
251
+ </div>
252
+ </div>
253
+ <br><br>
254
+ <button onclick="fun()" type="submit">Submit</button>
255
+ </form>
256
+
257
+ </div>
258
+ </div>
259
+ </div>
260
+
261
+ <script>
262
+ const scriptURL = 'https://script.google.com/macros/s/AKfycbwKHkc5yWD3-esG0dIBFiBcHB5xUlprfG8QGjTmtlHfl98DOgdnTPntUqtf8L6T1yLBAA/exec'
263
+ const form = document.forms['submit-to-google-sheet']
264
+
265
+ function confirmAndSubmit() {
266
+ const confirmation = window.confirm("Confirm if you'd like to submit this information!");
267
+
268
+ if (confirmation) {
269
+ fetch(scriptURL, { method: 'POST', body: new FormData(form) })
270
+ .then(response => {
271
+ console.log('Success!', response);
272
+ // Redirect to the home page after successful submission
273
+ window.location.href = 'admin home.html'; // Replace 'home.html' with your actual home page URL
274
+ })
275
+ .catch(error => console.error('Error!', error.message));
276
+ }
277
+ }
278
+
279
+ form.addEventListener('submit', e => {
280
+ e.preventDefault();
281
+ confirmAndSubmit();
282
+ });
283
+ </script>
284
+ </body>
285
+ </html>
allocation.png ADDED
analytics.py ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import csv
2
+ import pandas as pd
3
+ import numpy as np
4
+ import os
5
+
6
+ script_directory = os.path.dirname(os.path.abspath(__file__))
7
+
8
+ def write_to_csv_departments(time,teachingscore,teaching,courseContentscore,courseContent,
9
+ examinationscore,examination,labWorkscore,labWork,libraryFacilitiesscore,
10
+ libraryFacilities,extraCurricularscore,extraCurricular):
11
+ csv_file_path = os.path.join(script_directory, 'dataset', 'database.csv')
12
+
13
+ with open(csv_file_path, 'r') as f:
14
+ reader = csv.reader(f)
15
+ for header in reader:
16
+ break
17
+ with open(csv_file_path, "a", newline='') as f:
18
+ writer = csv.DictWriter(f, fieldnames=header)
19
+ dict = {'Timestamp': time, 'teachingscore': teachingscore, 'teaching': teaching,
20
+ 'coursecontentscore': courseContentscore, 'coursecontent': courseContent,
21
+ 'examinationscore': examinationscore, 'examination': examination,
22
+ 'labworkscore': labWorkscore, 'labwork': labWork,'libraryfacilitiesscore': libraryFacilitiesscore,
23
+ 'libraryfacilities': libraryFacilities, 'extracurricularscore': extraCurricularscore,
24
+ 'extracurricular': extraCurricular, 'Email Address': ''}
25
+ writer.writerow(dict)
26
+
27
+
28
+
29
+ def write_to_csv_teachers(teacher1,teacher1score,teacher2,teacher2score,teacher3,teacher3score,
30
+ teacher4,teacher4score,teacher5,teacher5score,teacher6,teacher6score):
31
+ csv_file_path = os.path.join(script_directory, 'dataset', 'teacherdb.csv')
32
+ with open(csv_file_path, 'r') as f:
33
+ reader = csv.reader(f)
34
+ for header in reader:
35
+ break
36
+ with open(csv_file_path, "a", newline='') as f:
37
+ writer = csv.DictWriter(f, fieldnames=header)
38
+ dict = {'teacher1': teacher1, 'teacher1score': teacher1score,
39
+ 'teacher2': teacher2,'teacher2score': teacher2score,
40
+ 'teacher3': teacher3, 'teacher3score': teacher3score,
41
+ 'teacher4': teacher4, 'teacher4score': teacher4score,
42
+ 'teacher5': teacher5, 'teacher5score': teacher5score,
43
+ 'teacher6': teacher6, 'teacher6score': teacher6score
44
+ }
45
+ writer.writerow(dict)
46
+
47
+
48
+
49
+
50
+ def get_counts():
51
+ csv_file_path = os.path.join(script_directory, 'dataset', 'database.csv')
52
+ df = pd.read_csv(csv_file_path)
53
+ index = df.index
54
+ no_of_students = len(index)
55
+ total_feedbacks = len(index)*6
56
+
57
+ df1 = df.groupby('teachingscore').count()[['teaching']]
58
+ teaching_negative_count = df1['teaching'][-1]
59
+ teaching_neutral_count = df1['teaching'][0]
60
+ teaching_positive_count = df1['teaching'][1]
61
+
62
+ df1 = df.groupby('coursecontentscore').count()[['coursecontent']]
63
+ coursecontent_negative_count = df1['coursecontent'][-1]
64
+ coursecontent_neutral_count = df1['coursecontent'][0]
65
+ coursecontent_positive_count = df1['coursecontent'][1]
66
+
67
+ df1 = df.groupby('examinationscore').count()[['examination']]
68
+ examination_negative_count = df1['examination'][-1]
69
+ examination_neutral_count = df1['examination'][0]
70
+ examination_positive_count = df1['examination'][1]
71
+
72
+ df1 = df.groupby('labworkscore').count()[['labwork']]
73
+ labwork_negative_count = df1['labwork'][-1]
74
+ labwork_neutral_count = df1['labwork'][0]
75
+ labwork_positive_count = df1['labwork'][1]
76
+
77
+ df1 = df.groupby('libraryfacilitiesscore').count()[['libraryfacilities']]
78
+ libraryfacilities_negative_count = df1['libraryfacilities'][-1]
79
+ libraryfacilities_neutral_count = df1['libraryfacilities'][0]
80
+ libraryfacilities_positive_count = df1['libraryfacilities'][1]
81
+
82
+ df1 = df.groupby('extracurricularscore').count()[['extracurricular']]
83
+ extracurricular_negative_count = df1['extracurricular'][-1]
84
+ extracurricular_neutral_count = df1['extracurricular'][0]
85
+ extracurricular_positive_count = df1['extracurricular'][1]
86
+
87
+ total_positive_feedbacks = teaching_positive_count + coursecontent_positive_count + examination_positive_count + labwork_positive_count + libraryfacilities_positive_count + extracurricular_positive_count
88
+ total_neutral_feedbacks = teaching_neutral_count + coursecontent_neutral_count + examination_neutral_count + labwork_neutral_count + libraryfacilities_neutral_count + extracurricular_neutral_count
89
+ total_negative_feedbacks = teaching_negative_count + coursecontent_negative_count + examination_negative_count +labwork_negative_count + libraryfacilities_negative_count + extracurricular_negative_count
90
+
91
+ li = [teaching_positive_count,teaching_negative_count,teaching_neutral_count,
92
+ coursecontent_positive_count,coursecontent_negative_count,coursecontent_neutral_count,
93
+ examination_positive_count,examination_negative_count,examination_neutral_count,
94
+ labwork_positive_count,labwork_negative_count,labwork_neutral_count,
95
+ libraryfacilities_positive_count,libraryfacilities_negative_count,libraryfacilities_neutral_count,
96
+ extracurricular_positive_count,extracurricular_negative_count,extracurricular_neutral_count]
97
+
98
+ return no_of_students,\
99
+ int(round(total_positive_feedbacks / total_feedbacks * 100)),\
100
+ int(round(total_negative_feedbacks / total_feedbacks * 100)),\
101
+ int(round(total_neutral_feedbacks / total_feedbacks * 100)),\
102
+ li
103
+
104
+ def get_tables():
105
+ csv_file_path = os.path.join(script_directory, 'dataset', 'database.csv')
106
+ df = pd.read_csv(csv_file_path)
107
+ df = df.tail(5)
108
+ return [df.to_html(classes='data')]
109
+
110
+ def get_titles():
111
+ csv_file_path = os.path.join(script_directory, 'dataset', 'database.csv')
112
+ df = pd.read_csv('dataset/database.csv')
113
+ return df.columns.values
114
+
analytics.pyc ADDED
Binary file (4.45 kB). View file
 
backgroundimg.jpg ADDED
backgroung-img.png ADDED
boy.png ADDED
comment.png ADDED
data-report.png ADDED
fee.avif ADDED
feedback-1.png ADDED
feedback.png ADDED
home.png ADDED
home_page.html ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Your Website</title>
7
+ <style>
8
+ body {
9
+ margin: 0;
10
+ padding: 0;
11
+ font-family: Arial, sans-serif;
12
+ background-image: url('backgroung-img.png'); /* Replace with your background image */
13
+ background-size: cover;
14
+ background-repeat: no-repeat;
15
+ display: flex;
16
+ justify-content: center;
17
+ align-items: center;
18
+ height: 100vh;
19
+ }
20
+
21
+ .navbar {
22
+ display: flex;
23
+ justify-content: space-between;
24
+ align-items: center;
25
+ background-color: rgb(6, 6, 65); /* Semi-transparent black background */
26
+ padding: 15px 20px;
27
+ position: fixed;
28
+ top: 0;
29
+ width: 100%;
30
+ height: 10%;
31
+ z-index: 1000; /* Ensure the navbar is above other content */
32
+ }
33
+
34
+ .logo {
35
+ color: #fff;
36
+ font-size: 50px;
37
+ font-weight: bold;
38
+ text-decoration: none;
39
+ margin-left: 50px;
40
+ }
41
+
42
+ .icons {
43
+ display: flex;
44
+ gap: 20px;
45
+ }
46
+
47
+ .icons a {
48
+ display: flex;
49
+ align-items: center;
50
+ color: #fff;
51
+ text-decoration: none;
52
+ font-size: 18px;
53
+ transition: color 0.3s ease-in-out;
54
+ }
55
+
56
+ .icons a:hover {
57
+ color: #3498db;
58
+ }
59
+
60
+ .icon-img {
61
+ width: 50px;
62
+ height: 50px;
63
+ margin-right: 100px;
64
+ }
65
+ .card-container {
66
+ display: flex;
67
+ justify-content: center;
68
+ align-items: center;
69
+ }
70
+
71
+ .card {
72
+ background-color: rgba(66, 65, 65, 0.7); /* Semi-transparent white background */
73
+ padding: 60px;
74
+ border-radius: 10px;
75
+ text-align: center;
76
+ max-width: 600px;
77
+ margin: 10px;
78
+ }
79
+
80
+ .card img {
81
+ width: 100%;
82
+ height: auto;
83
+ margin-bottom: 10px;
84
+ }
85
+ .card p {
86
+ color: #fff;
87
+ padding-top: 10px;
88
+ font-weight: 400;
89
+ max-height: 6rem;
90
+ font-size: 1.5rem;
91
+ line-height: 1;
92
+ overflow: hidden;
93
+ text-overflow: ellipsis;
94
+ }
95
+
96
+ .styled-button {
97
+ background-color:transparent;
98
+ color: #ffffff;
99
+ padding: 30px 100px;
100
+ border: 1px solid rgb(62, 61, 61);
101
+ border-radius: 20px;
102
+ font-size: 30px;
103
+ font-weight: 700;
104
+ cursor: pointer;
105
+ transition: background-color 0.3s ease-in-out;
106
+ }
107
+
108
+ .styled-button:hover {
109
+ background-color:rgba(52, 152, 219, 0.1);;
110
+ }
111
+
112
+ </style>
113
+ </head>
114
+ <body>
115
+ <div class="navbar">
116
+ <div class="logo">EASA</div>
117
+ <div class="icons">
118
+ <a href="#">
119
+ <img src="home.png" alt="Home" class="icon-img">
120
+ </a>
121
+ <a href="#">
122
+ <img src="data-report.png" alt="Dashboard" class="icon-img">
123
+ </a>
124
+ <a href="#">
125
+ <img src="comment.png" alt="Chats" class="icon-img">
126
+ </a>
127
+ <a href="#">
128
+ <img src="notification.png" alt="Doubts" class="icon-img">
129
+ </a>
130
+ </div>
131
+ </div>
132
+
133
+ <div class="card-container">
134
+ <div class="card">
135
+ <img src="allocation.png" alt="Image 1">
136
+ <a href="acdameic_details.html"><button class="styled-button">Student Subject Allocation </button></a>
137
+ <p>Simplify course selection with our streamlined system for optimal subject assignment. Elevate student experience effortlessly.</p>
138
+ </div>
139
+
140
+ <div class="card">
141
+ <img src="feedback-1.png" alt="Image 2" >
142
+ <a href="http://192.168.7.147:5978"><button onclick="student_details"class="styled-button" >Student Feedback Analysis</button></a>
143
+ <p>Gain valuable insights with our Student Feedback Analysis System. Elevate learning experiences through data-driven improvements.</p>
144
+ </div>
145
+ </div>
146
+
147
+ <!-- Rest of your website content goes here -->
148
+
149
+ </body>
150
+ <script>
151
+
152
+
153
+ </script>
154
+ </html>
index.html ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Divided Webpage</title>
7
+ <style>
8
+ body {
9
+ margin: 0;
10
+ padding: 0;
11
+ font-family: Arial, sans-serif;
12
+ }
13
+
14
+ .container {
15
+ display: flex;
16
+ height: 100vh;
17
+ }
18
+
19
+ .image-section {
20
+ flex: 0.7;
21
+ background: url('backgroundimg.jpg') center/cover no-repeat;
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ flex-direction: column;
26
+ position: relative;
27
+ color: #fff;
28
+ }
29
+ .image-section h1 {
30
+ font-size: 3rem;
31
+ margin-bottom: 40px;
32
+ color: #f0f0f0;
33
+ }
34
+
35
+ .image-section h3 {
36
+ font-size: 2rem;
37
+ margin-bottom: 10px;
38
+ color: #f0f0f0;
39
+ text-align: center;
40
+ }
41
+
42
+ .image-section .bottom-text {
43
+ position: absolute;
44
+ font-size: 2rem;
45
+ bottom: 20px;
46
+ }
47
+
48
+ .content-section {
49
+ flex: 1;
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background-color: #f0f0f0;
54
+ }
55
+ .login-form {
56
+ background-color:rgba(255, 255, 255, 0.5);
57
+ border-radius: 10px;
58
+ padding: 100px;
59
+ box-shadow: 0px 0px 120px rgba(0, 0, 0, 0.2);
60
+ text-align: center;
61
+ }
62
+
63
+ .login-form img {
64
+ width: 60px;
65
+ margin-bottom: 5px;
66
+ }
67
+ .login-form button {
68
+ background-color: #3498db;
69
+ color: #fff;
70
+ padding: 20px 30px;
71
+ border: none;
72
+ border-radius: 5px;
73
+ cursor: pointer;
74
+ }
75
+ .login-form input {
76
+ width: 90%;
77
+ height: 10%; /* Make input box wider */
78
+ padding: 20px; /* Increase padding for a larger input box */
79
+ margin-bottom: 20px;
80
+ border: 1px solid #ccc;
81
+ border-radius: 9px;
82
+ }
83
+ .login-form h2 {
84
+ margin-bottom: 40px;
85
+ }
86
+ .small-image {
87
+ width: 100%;
88
+ height: 100%;
89
+ margin-bottom: 10px;
90
+ }
91
+
92
+ .content {
93
+ text-align: center;
94
+ padding: 20px;
95
+ }
96
+ </style>
97
+ </head>
98
+ <body>
99
+ <div class="container">
100
+ <div class="image-section">
101
+ <h1>Welcome to EASA</h1>
102
+ <h3>Discover EASA: Your Elective <BR>Allocation and Feedback Solution!<br>
103
+ Experience streamlined elective choices <br>
104
+ based on your preferences and <br> academic performance. </h3>
105
+ <p class="bottom-text">Revolutionize your education with EASA!</p>
106
+ </div>
107
+
108
+ <div class="content-section">
109
+ <div class="content">
110
+ <img class="small-image" src="loginabove.png" alt="Small Image" >
111
+ <div class="login-form">
112
+ <!-- <img src="login-icon.png" alt="Login Icon"> -->
113
+ <h2>Login</h2>
114
+ <form>
115
+ <input type="text" placeholder="Username" required><br>
116
+ <input type="password" placeholder="Password" required><br>
117
+
118
+ </form>
119
+ <a href="admin elective.html"><button type="submit">Admin Login</button></a>
120
+ <a href="home_page.html"><button type="submit">Student Login</button></a>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ </body>
126
+ </html>
loginabove.png ADDED
models.py ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import numpy as np
3
+ import pickle
4
+ from sklearn.feature_extraction.text import CountVectorizer
5
+ from sklearn.feature_extraction.text import TfidfTransformer
6
+ from sklearn.pipeline import Pipeline
7
+ from nltk.stem.snowball import SnowballStemmer
8
+ from sklearn.linear_model import SGDClassifier
9
+ from sklearn.naive_bayes import MultinomialNB
10
+
11
+ class Models:
12
+
13
+ def __init__(self):
14
+ self.name = ''
15
+ path = 'dataset/trainingdata.csv'
16
+ df = pd.read_csv(path)
17
+ df = df.dropna()
18
+ self.x = df['sentences']
19
+ self.y = df['sentiments']
20
+
21
+ def mnb_classifier(self):
22
+ self.name = 'MultinomialNB classifier'
23
+ classifier = Pipeline([('vect', CountVectorizer()), ('tfidf', TfidfTransformer()), ('clf', MultinomialNB())])
24
+ return classifier.fit(self.x, self.y)
25
+
26
+ def svm_classifier(self):
27
+ self.name = 'SVM classifier'
28
+ classifier = Pipeline([('vect', CountVectorizer()), ('tfidf', TfidfTransformer()),('clf-svm', SGDClassifier(loss='hinge', penalty='l2',alpha=1e-3, random_state=42))])
29
+ classifier = classifier.fit(self.x, self.y)
30
+ pickle.dump(classifier,open(self.name + '.pkl', "wb"))
31
+ return classifier
32
+
33
+ def mnb_stemmed_classifier(self):
34
+ self.name = 'MultinomialNB stemmed classifier'
35
+ self.stemmed_count_vect = StemmedCountVectorizer(stop_words='english')
36
+ classifier = Pipeline([('vect', self.stemmed_count_vect), ('tfidf', TfidfTransformer()),('mnb', MultinomialNB(fit_prior=False))])
37
+ classifier = classifier.fit(self.x, self.y)
38
+ pickle.dump(classifier, open(self.name + '.pkl', "wb"))
39
+ return classifier
40
+
41
+ def svm_stemmed_classifier(self):
42
+ self.name = 'SVM stemmed classifier'
43
+ self.stemmed_count_vect = StemmedCountVectorizer(stop_words='english')
44
+ classifier = Pipeline([('vect', self.stemmed_count_vect), ('tfidf', TfidfTransformer()),('clf-svm', SGDClassifier())])
45
+ classifier = classifier.fit(self.x, self.y)
46
+ pickle.dump(classifier, open(self.name + '.pkl', "wb"))
47
+ return classifier
48
+
49
+ def accuracy(self, model):
50
+ predicted = model.predict(self.x)
51
+ accuracy = np.mean(predicted == self.y)
52
+ print(f"{self.name} has accuracy of {accuracy * 100} % ")
53
+
54
+ class StemmedCountVectorizer(CountVectorizer):
55
+
56
+ def build_analyzer(self):
57
+ stemmer = SnowballStemmer("english", ignore_stopwords=True)
58
+ analyzer = super(StemmedCountVectorizer, self).build_analyzer()
59
+ return lambda doc: ([stemmer.stem(w) for w in analyzer(doc)])
60
+
61
+
62
+ if __name__ == '__main__':
63
+ model = Models()
64
+ model.accuracy(model.mnb_classifier())
65
+ model.accuracy(model.svm_classifier())
66
+ model.accuracy(model.mnb_stemmed_classifier())
67
+ model.accuracy(model.svm_stemmed_classifier())
68
+
notification.png ADDED
server.py ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import pickle
3
+ import pandas as pd
4
+ from flask import Flask, request, render_template, session
5
+ from datetime import datetime
6
+ from analytics import write_to_csv_departments,write_to_csv_teachers
7
+ from analytics import get_counts
8
+ from teacherdashboard import get_feedback_counts
9
+
10
+ app = Flask(__name__)
11
+
12
+
13
+ @app.route('/')
14
+ def index():
15
+ return render_template('index.html')
16
+
17
+
18
+ @app.route('/login', methods=['POST'])
19
+ def do_admin_login():
20
+ if request.form['password'] == 'admin' and request.form['username'] == 'admin':
21
+ session['logged_in'] = True
22
+ return root()
23
+ elif request.form['password'] == 'hod' and request.form['username'] == 'hod':
24
+ session['logged_in'] = True
25
+ return hoddashboard()
26
+ elif request.form['password'] == 'teacher1' and request.form['username'] == 'teacher1':
27
+ session['logged_in'] = True
28
+ return teacherdashboard(1)
29
+ elif request.form['password'] == 'teacher2' and request.form['username'] == 'teacher2':
30
+ session['logged_in'] = True
31
+ return teacherdashboard(2)
32
+ elif request.form['password'] == 'teacher3' and request.form['username'] == 'teacher3':
33
+ session['logged_in'] = True
34
+ return teacherdashboard(3)
35
+ elif request.form['password'] == 'teacher4' and request.form['username'] == 'teacher4':
36
+ session['logged_in'] = True
37
+ return teacherdashboard(4)
38
+ elif request.form['password'] == 'teacher5' and request.form['username'] == 'teacher5':
39
+ session['logged_in'] = True
40
+ return teacherdashboard(5)
41
+ elif request.form['password'] == 'teacher6' and request.form['username'] == 'teacher6':
42
+ session['logged_in'] = True
43
+ return teacherdashboard(6)
44
+ else :
45
+ return render_template('loginerror.html')
46
+
47
+ def teacherdashboard(teachernumber):
48
+ ttf, teachers_total_positive_feedbacks, teachers_total_negative_feedbacks, teachers_total_neutral_feedbacks, teachers_li = get_feedback_counts()
49
+ ttp, ttn, ttneu, tcp, tcn, tcneu, tep, ten, teneu, tlwp, tlwn, tlwneu, tlfp, tlfn, tlfneu, tecp, tecn, tecneu = teachers_li
50
+
51
+ ttp = int(round(ttp/ttf *100));ttn = int(round(ttn/ttf *100));ttneu = int(round(ttneu/ttf *100))
52
+ tcp = int(round(tcp / ttf * 100));tcn = int(round(tcn/ttf *100));tcneu = int(round(tcneu/ttf *100))
53
+ tep = int(round(tep / ttf * 100));ten = int(round(ten/ttf *100));teneu = int(round(teneu/ttf *100))
54
+ tlwp = int(round(tlwp / ttf * 100));tlwn = int(round(tlwn/ttf *100));tlwneu = int(round(tlwneu/ttf *100))
55
+ tlfp = int(round(tlfp / ttf * 100));tlfn = int(round(tlfn/ttf *100));tlfneu = int(round(tlfneu/ttf *100))
56
+ tecp = int(round(tecp / ttf * 100));tecn = int(round(tecn/ttf *100));tecneu = int(round(tecneu/ttf *100))
57
+
58
+ if teachernumber == 1:
59
+ return render_template('teacherdashboard.html',ttf=ttf,ttp=ttp, ttn=ttn, ttneu=ttneu)
60
+ elif teachernumber == 2:
61
+ return render_template('teacherdashboard.html',ttf=ttf,ttp=tcp, ttn=tcn, ttneu=tcneu)
62
+ elif teachernumber == 3:
63
+ return render_template('teacherdashboard.html',ttf=ttf,ttp=tep, ttn=ten, ttneu=teneu)
64
+ elif teachernumber == 4:
65
+ return render_template('teacherdashboard.html',ttf=ttf,ttp=tlwp, ttn=tlwn, ttneu=tlwneu)
66
+ elif teachernumber == 5:
67
+ return render_template('teacherdashboard.html',ttf=ttf,ttp=tlfp, ttn=tlfn, ttneu=tlfneu)
68
+ else:
69
+ return render_template('teacherdashboard.html',ttf=ttf,ttp=tecp, ttn=tecn, ttneu=tecneu)
70
+
71
+
72
+ @app.route('/login', methods=['GET'])
73
+ def login():
74
+ return render_template('login.html')
75
+
76
+
77
+ @app.route("/logout")
78
+ def logout():
79
+ session['logged_in'] = False
80
+ return render_template('index.html')
81
+
82
+
83
+ @app.route("/predict", methods=['POST'])
84
+ def predict():
85
+
86
+ teaching = request.form['teaching']
87
+ courseContent = request.form['coursecontent']
88
+ examination = request.form['examination']
89
+ labWork = request.form['labwork']
90
+ libraryFacilities = request.form['libraryfacilities']
91
+ extraCurricular = request.form['extracurricular']
92
+
93
+ teacher1 = request.form['teacher1']
94
+ teacher2 = request.form['teacher2']
95
+ teacher3 = request.form['teacher3']
96
+ teacher4 = request.form['teacher4']
97
+ teacher5 = request.form['teacher5']
98
+ teacher6 = request.form['teacher6']
99
+
100
+ model = pickle.load(open('SVM classifier.pkl', 'rb'))
101
+ teachingscore = model.predict(pd.array([teaching]))
102
+ courseContentscore = model.predict(pd.array([courseContent]))
103
+ examinationscore = model.predict(pd.array([examination]))
104
+ labWorkscore = model.predict(pd.array([labWork]))
105
+ libraryFacilitiesscore = model.predict(pd.array([libraryFacilities]))
106
+ extraCurricularscore = model.predict(pd.array([extraCurricular]))
107
+ time = datetime.now().strftime("%m/%d/%Y (%H:%M:%S)")
108
+
109
+ teacher1score = model.predict(pd.array([teacher1]))
110
+ teacher2score = model.predict(pd.array([teacher2]))
111
+ teacher3score = model.predict(pd.array([teacher3]))
112
+ teacher4score = model.predict(pd.array([teacher4]))
113
+ teacher5score = model.predict(pd.array([teacher5]))
114
+ teacher6score = model.predict(pd.array([teacher6]))
115
+
116
+ write_to_csv_departments(time,teachingscore[0],teaching,courseContentscore[0],courseContent,
117
+ examinationscore[0],examination,labWorkscore[0],labWork,libraryFacilitiesscore[0],
118
+ libraryFacilities,extraCurricularscore[0],extraCurricular)
119
+
120
+ write_to_csv_teachers(teacher1,teacher1score[0],teacher2,teacher2score[0],teacher3,teacher3score[0],
121
+ teacher4,teacher4score[0],teacher5,teacher5score[0],teacher6,teacher6score[0])
122
+
123
+ return render_template('thankyoupage.html')
124
+
125
+
126
+ @app.route('/admin')
127
+ def root():
128
+ if not session.get('logged_in'):
129
+ return render_template('login.html')
130
+ else:
131
+ total_feedbacks, total_positive_feedbacks, total_negative_feedbacks, total_neutral_feedbacks, li = get_counts()
132
+ tp,tn,tneu,cp,cn,cneu,ep,en,eneu,lwp,lwn,lwneu,lfp,lfn,lfneu,ecp,ecn,ecneu = li
133
+ teachers_total_feedbacks, teachers_total_positive_feedbacks, teachers_total_negative_feedbacks, teachers_total_neutral_feedbacks, teachers_li = get_feedback_counts()
134
+ ttp, ttn, ttneu, tcp, tcn, tcneu, tep, ten, teneu, tlwp, tlwn, tlwneu, tlfp, tlfn, tlfneu, tecp, tecn, tecneu = teachers_li
135
+
136
+ return render_template('admin.html',tf = total_feedbacks,tpf = total_positive_feedbacks,tnegf = total_negative_feedbacks, tneuf= total_neutral_feedbacks,
137
+ tp=tp,tn=tn,tneu=tneu,cp=cp,cn=cn,cneu=cneu,ep=ep,en=en,eneu=eneu,
138
+ lwp=lwp,lwn=lwn,lwneu=lwneu,lfp=lfp,lfn=lfn,lfneu=lfneu,ecp=ecp,
139
+ ecn=ecn,ecneu=ecneu,
140
+ ttf = teachers_total_feedbacks, ttpf = teachers_total_positive_feedbacks, ttnegf = teachers_total_negative_feedbacks,
141
+ ttneuf = teachers_total_neutral_feedbacks,ttp = ttp, ttn = ttn, ttneu = ttneu, tcp = tcp, tcn = tcn,
142
+ tcneu = tcneu, tep = tep, ten = ten, teneu = teneu,tlwp = tlwp, tlwn = tlwn,
143
+ tlwneu = tlwneu, tlfp = tlfp, tlfn = tlfn, tlfneu = tlfneu, tecp = tecp,tecn = tecn, tecneu = tecneu
144
+ )
145
+
146
+
147
+ @app.route("/hoddashboard")
148
+ def hoddashboard():
149
+ if not session.get('logged_in'):
150
+ return render_template('login.html')
151
+ else :
152
+ teachers_total_feedbacks, teachers_total_positive_feedbacks, teachers_total_negative_feedbacks, teachers_total_neutral_feedbacks, teachers_li = get_feedback_counts()
153
+ ttp, ttn, ttneu, tcp, tcn, tcneu, tep, ten, teneu, tlwp, tlwn, tlwneu, tlfp, tlfn, tlfneu, tecp, tecn, tecneu = teachers_li
154
+ return render_template('hoddashboard.html',
155
+ ttf=teachers_total_feedbacks, ttpf=teachers_total_positive_feedbacks,
156
+ ttnegf=teachers_total_negative_feedbacks,
157
+ ttneuf=teachers_total_neutral_feedbacks, ttp=ttp, ttn=ttn, ttneu=ttneu, tcp=tcp, tcn=tcn,
158
+ tcneu=tcneu, tep=tep, ten=ten, teneu=teneu, tlwp=tlwp, tlwn=tlwn,
159
+ tlwneu=tlwneu, tlfp=tlfp, tlfn=tlfn, tlfneu=tlfneu, tecp=tecp, tecn=tecn, tecneu=tecneu
160
+ )
161
+
162
+
163
+
164
+
165
+ @app.route("/displayteacherfeedbacks")
166
+ def displayteacherfeedbacks():
167
+ if not session.get('logged_in'):
168
+ return render_template('login.html')
169
+ else:
170
+ df1 = pd.read_csv('dataset/teacherdb.csv')
171
+ return render_template('teacherfeedbacks.html', tables=[df1.to_html(classes='data', header="true")])
172
+
173
+
174
+ @app.route("/display")
175
+ def display():
176
+ if not session.get('logged_in'):
177
+ return render_template('login.html')
178
+ else:
179
+ df = pd.read_csv('dataset/database.csv')
180
+ return render_template('feedbacks.html', tables=[df.to_html(classes='data', header="true")])
181
+
182
+
183
+ app.secret_key = os.urandom(12)
184
+ app.run( host='0.0.0.0', debug=True)
185
+
teacherdashboard.py ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import csv
2
+ import pandas as pd
3
+ import numpy as np
4
+ import os
5
+
6
+ def get_feedback_counts():
7
+ # path = 'dataset/teacherdb.csv'
8
+ # df = pd.read_csv(path)
9
+ script_directory = os.path.dirname(os.path.abspath(__file__)) # Get the directory of the script
10
+ csv_file_path = os.path.join(script_directory, 'dataset', 'teacherdb.csv') # Construct the absolute path to the CSV file
11
+
12
+ if not os.path.exists(csv_file_path):
13
+ raise FileNotFoundError(f"File '{csv_file_path}' not found")
14
+
15
+ df = pd.read_csv(csv_file_path)
16
+ index = df.index
17
+ no_of_feedbacks = len(index)
18
+ total_feedbacks = len(index)*6
19
+
20
+ df1 = df.groupby('teacher1score').count()[['teacher1']]
21
+ teacher1_negative_count = df1['teacher1'][-1]
22
+ teacher1_neutral_count = df1['teacher1'][0]
23
+ teacher1_positive_count = df1['teacher1'][1]
24
+
25
+ df1 = df.groupby('teacher2score').count()[['teacher2']]
26
+ teacher2_negative_count = df1['teacher2'][-1]
27
+ teacher2_neutral_count = df1['teacher2'][0]
28
+ teacher2_positive_count = df1['teacher2'][1]
29
+
30
+ df1 = df.groupby('teacher3score').count()[['teacher3']]
31
+ teacher3_negative_count = df1['teacher3'][-1]
32
+ teacher3_neutral_count = df1['teacher3'][0]
33
+ teacher3_positive_count = df1['teacher3'][1]
34
+
35
+ df1 = df.groupby('teacher4score').count()[['teacher4']]
36
+ teacher4_negative_count = df1['teacher4'][-1]
37
+ teacher4_neutral_count = df1['teacher4'][0]
38
+ teacher4_positive_count = df1['teacher4'][1]
39
+
40
+ df1 = df.groupby('teacher5score').count()[['teacher5']]
41
+ teacher5_negative_count = df1['teacher5'][-1]
42
+ teacher5_neutral_count = df1['teacher5'][0]
43
+ teacher5_positive_count = df1['teacher5'][1]
44
+
45
+ df1 = df.groupby('teacher6score').count()[['teacher6']]
46
+ teacher6_negative_count = df1['teacher6'][-1]
47
+ teacher6_neutral_count = df1['teacher6'][0]
48
+ teacher6_positive_count = df1['teacher6'][1]
49
+
50
+ total_positive_feedbacks = teacher1_positive_count + teacher2_positive_count + teacher3_positive_count + teacher4_positive_count + teacher5_positive_count + teacher6_positive_count
51
+ total_neutral_feedbacks = teacher1_neutral_count + teacher2_neutral_count + teacher3_neutral_count + teacher4_neutral_count + teacher5_neutral_count + teacher6_neutral_count
52
+ total_negative_feedbacks = teacher1_negative_count + teacher2_negative_count + teacher3_negative_count +teacher4_negative_count + teacher5_negative_count + teacher6_negative_count
53
+
54
+ li = [teacher1_positive_count,teacher1_negative_count,teacher1_neutral_count,
55
+ teacher2_positive_count,teacher2_negative_count,teacher2_neutral_count,
56
+ teacher3_positive_count,teacher3_negative_count,teacher3_neutral_count,
57
+ teacher4_positive_count,teacher4_negative_count,teacher4_neutral_count,
58
+ teacher5_positive_count,teacher5_negative_count,teacher5_neutral_count,
59
+ teacher6_positive_count,teacher6_negative_count,teacher6_neutral_count]
60
+
61
+
62
+ return no_of_feedbacks,\
63
+ int(round(total_positive_feedbacks / total_feedbacks * 100)),\
64
+ int(round(total_negative_feedbacks / total_feedbacks * 100)),\
65
+ int(round(total_neutral_feedbacks / total_feedbacks * 100)),\
66
+ li
67
+
68
+
tempCodeRunnerFile.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ return render_template('hoddashboard.html',
2
+ ttf=teachers_total_feedbacks, ttpf=teachers_total_positive_feedbacks,
3
+ ttnegf=teachers_total_negative_feedbacks,
4
+ ttneuf=teachers_total_neutral_feedbacks, ttp=ttp, ttn=ttn, ttneu=ttneu, tcp=tcp, tcn=tcn,
5
+ tcneu=tcneu, tep=tep, ten=ten, teneu=teneu, tlwp=tlwp, tlwn=tlwn,
6
+ tlwneu=tlwneu, tlfp=tlfp, tlfn=tlfn, tlfneu=tlfneu, tecp=tecp, tecn=tecn, tecneu=tecneu
7
+ )