Spaces:
Running
Running
Update index.html
Browse files- index.html +17 -44
index.html
CHANGED
@@ -4,8 +4,6 @@
|
|
4 |
<meta charset="utf-8" />
|
5 |
<meta name="viewport" content="width=device-width" />
|
6 |
<title>๐
Korean AI leaderboard</title>
|
7 |
-
<!-- <link rel="stylesheet" href="style.css" />-->
|
8 |
-
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> -->
|
9 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
10 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
11 |
|
@@ -33,7 +31,7 @@
|
|
33 |
}
|
34 |
|
35 |
.table-task-list tbody tr.selected {
|
36 |
-
background-color: #e9ecef !important;
|
37 |
}
|
38 |
|
39 |
.table-task-list, .table-task-detail {
|
@@ -99,6 +97,7 @@
|
|
99 |
text-align: center;
|
100 |
border-left: 1px solid #ddd;
|
101 |
border-top: 1px solid #ddd;
|
|
|
102 |
}
|
103 |
|
104 |
.tabs {
|
@@ -162,8 +161,6 @@
|
|
162 |
text-align: center;
|
163 |
}
|
164 |
#header_content{
|
165 |
-
/*margin-left: 10%; !* ์ผ์ชฝ ๋ง์ง ์ค์ *!*/
|
166 |
-
/*margin-right: 10%; !* ์ค๋ฅธ์ชฝ ๋ง์ง ์ค์ *!*/
|
167 |
font-size:15px;
|
168 |
}
|
169 |
.detail-div
|
@@ -174,14 +171,14 @@
|
|
174 |
margin-top:30px;
|
175 |
}
|
176 |
a:link, a:visited, a:hover, a:active {
|
177 |
-
color: #1d4ed8;
|
178 |
}
|
179 |
.toggle-button{
|
180 |
cursor:pointer;
|
181 |
background-color: white;
|
182 |
border:1px solid #ccc;
|
183 |
padding:5px 8px;
|
184 |
-
margin: 10px;
|
185 |
}
|
186 |
.fas{
|
187 |
color:#3fb9ae;
|
@@ -192,14 +189,6 @@
|
|
192 |
</style>
|
193 |
</head>
|
194 |
<body>
|
195 |
-
<!-- <div class="card">
|
196 |
-
<h1>๐
Korean AI leaderboard</h1>
|
197 |
-
<p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
|
198 |
-
<p>
|
199 |
-
Also don't forget to check the
|
200 |
-
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
201 |
-
</p>
|
202 |
-
</div> -->
|
203 |
<div class="header">
|
204 |
<div id="header_title"><h2>๐
Korean AI leaderboard</h2></div>
|
205 |
<div id="header_content"><p>[2024 ๊ตญ๋ฆฝ๊ตญ์ด์ ์ธ๊ณต ์ง๋ฅ ์ธ์ด ๋ฅ๋ ฅ ํ๊ฐ]</p>
|
@@ -330,7 +319,6 @@
|
|
330 |
$('.tab-link').click(function () {
|
331 |
var selectedTab = $(this).attr('id').split('-')[1];
|
332 |
now_task = selectedTab;
|
333 |
-
// console.log(now_task)
|
334 |
$('.tab-link').removeClass('active');
|
335 |
$(this).addClass('active');
|
336 |
|
@@ -347,8 +335,6 @@
|
|
347 |
function getRow(checked_task){
|
348 |
postdata = {"checked_progress":checked_task}
|
349 |
var clCd = (now_task === "progress") ? "ING_TASK" : "END_TASK";
|
350 |
-
|
351 |
-
// var url = "http://signlab.iptime.org:19021/taskOrdtm/useTaskOrdtmListData.do?clCd=" + clCd + "&siteType=USERLIST&partInYN=N"
|
352 |
var url = "https://kli.korean.go.kr/benchmark/taskOrdtm/useTaskOrdtmListData.do?clCd="+clCd+"&siteType=USERLIST&partInYN=N"
|
353 |
$.ajax({
|
354 |
type: 'GET',
|
@@ -356,7 +342,6 @@
|
|
356 |
dataType: 'JSON',
|
357 |
contentType: "application/json; charset=utf-8",
|
358 |
success: function(response) {
|
359 |
-
console.log(response)
|
360 |
var tableBody = (checked_task === "progress") ? $('#table-progress tbody') : $('#table-past tbody');
|
361 |
tableBody.empty(); // ๊ธฐ์กด ๋ด์ฉ์ ๋น์๋๋ค.
|
362 |
var rowNum = 0
|
@@ -364,7 +349,7 @@
|
|
364 |
response.forEach(function(item) {
|
365 |
// console.log(item['taskOrdtmNm'])
|
366 |
rowNum = rowNum + 1
|
367 |
-
var row = $('<tr>').attr('data-taskid', item['taskOrdtmId']);
|
368 |
// var row = $('<tr>');
|
369 |
row.append($('<td>').text(rowNum)); // No
|
370 |
row.append($('<td>').text(item['taskOrdtmNm'])); // ๊ณผ์ ๋ช
|
@@ -381,8 +366,7 @@
|
|
381 |
TaskRowClicked(taskId); // ๊ณผ์ ์๋ณ ID๋ฅผ ์ธ์๋ก ๋๊ฒจ์ฃผ๋ฉด์ ํจ์ ์คํ
|
382 |
});
|
383 |
});
|
384 |
-
|
385 |
-
$('#task-' + now_task).show(); // Show the selected tab
|
386 |
},
|
387 |
error: function(request, status, error) {
|
388 |
alert('ajax ํต์ ์คํจ');
|
@@ -397,13 +381,10 @@
|
|
397 |
}
|
398 |
|
399 |
function TaskRowClicked(taskId) {
|
400 |
-
console.log("Clicked task ID:", taskId);
|
401 |
-
// ์ AJAX ์์ฒญ์ ๋ณด๋
๋๋ค.
|
402 |
$.ajax({
|
403 |
// type: 'POST',
|
404 |
type: 'GET',
|
405 |
url: 'https://kli.korean.go.kr/benchmark/taskOrdtm/taskLeaderBoardData.do?taskOrdtmId='+taskId,
|
406 |
-
// data: JSON.stringify(postdata),
|
407 |
dataType: 'JSON',
|
408 |
contentType: "application/json",
|
409 |
success: function(response) {
|
@@ -413,7 +394,7 @@
|
|
413 |
hrArea.html("<br><br><hr class=\"custom-hr\"><br>");
|
414 |
|
415 |
|
416 |
-
|
417 |
var noticeDetail = now_task === "progress" ? $('#task-progress-notice-div') : $('#task-past-notice-div');
|
418 |
var taskNameDiv = noticeDetail.find('.notice-task-name');
|
419 |
var taskPeriodDiv = noticeDetail.find('.notice-task-period');
|
@@ -431,9 +412,6 @@
|
|
431 |
taskPeriodDiv.html(response.taskOrdtmInfo.taskOrdtmBgngDt + " - " + response.taskOrdtmInfo.taskOrdtmEndDt);
|
432 |
if (formattedTaskInfo != null){
|
433 |
|
434 |
-
// console.log("๋ณ๊ฒฝ๋ formattedTaskInfo์
๋๋ค.")
|
435 |
-
// console.log(formattedTaskInfo)
|
436 |
-
|
437 |
taskInfoDiv.html(formattedTaskInfo);
|
438 |
}
|
439 |
else{
|
@@ -443,36 +421,32 @@
|
|
443 |
var tableTitle = now_task === "progress" ? $('#table-progress-detail-title') : $('#table-past-detail-title');
|
444 |
tableTitle.empty();
|
445 |
tableTitle.html("<br><br><hr class=\"custom-hr\"><br><h1>์์ํ</h1><br><br>");
|
446 |
-
|
447 |
var tableDetail = now_task === "progress" ? $('#table-progress-detail') : $('#table-past-detail');
|
448 |
-
// console.log(tableDetail.attr("id"))
|
449 |
var thead = tableDetail.find('thead');
|
450 |
var tbody = tableDetail.find('tbody');
|
451 |
|
452 |
-
tableDetail.show();
|
453 |
-
tableDetail.css("display", "table");
|
454 |
|
455 |
-
// ํค๋๋ฅผ
|
456 |
-
thead.empty();
|
457 |
var headerRow = $('<tr>');
|
458 |
|
459 |
-
|
460 |
-
|
461 |
var leaderboard = response.leaderboard;
|
462 |
|
463 |
-
|
464 |
var detailKeys = leaderboard[0].taskOrdtmModels[0].taskOrdtmScore.taskOrdtmItemScores[0].taskOrdtmItemIdxScores.map(function(item) {
|
465 |
return item.taskOrdtmItemIdx.idxNm;
|
466 |
});
|
467 |
-
|
468 |
-
// Set up headers
|
469 |
var headers = ["Rank", "Team", "Model Name", "Evaluation Score"].concat(detailKeys, "Submit Date");
|
470 |
var headerRow = $('<tr>');
|
471 |
headers.forEach(function(headerTitle) {
|
472 |
headerRow.append($('<th>').text(headerTitle));
|
473 |
});
|
474 |
|
475 |
-
|
476 |
thead.append(headerRow);
|
477 |
tbody.empty();
|
478 |
|
@@ -498,7 +472,7 @@
|
|
498 |
// Model name
|
499 |
row.append($('<td>').text(decodeHtml(model.modelNm)));
|
500 |
|
501 |
-
// Evaluation score
|
502 |
row.append($('<td>').text(parseFloat(model.score).toFixed(7)).css('color', '#ee3a49'));
|
503 |
|
504 |
// Detail scores
|
@@ -509,7 +483,6 @@
|
|
509 |
row.append($('<td>').text(score));
|
510 |
});
|
511 |
|
512 |
-
// Submission date
|
513 |
var submitDate = new Date(model.sbmsnDt);
|
514 |
var formattedDate = submitDate.getFullYear() + '.' +
|
515 |
('0' + (submitDate.getMonth() + 1)).slice(-2) + '.' +
|
@@ -518,8 +491,8 @@
|
|
518 |
('0' + submitDate.getMinutes()).slice(-2);
|
519 |
row.append($('<td>').text(formattedDate));
|
520 |
|
521 |
-
// Append row to the table
|
522 |
tbody.append(row);
|
|
|
523 |
if (modelIndex !== 0) {
|
524 |
row.hide();
|
525 |
}
|
|
|
4 |
<meta charset="utf-8" />
|
5 |
<meta name="viewport" content="width=device-width" />
|
6 |
<title>๐
Korean AI leaderboard</title>
|
|
|
|
|
7 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
9 |
|
|
|
31 |
}
|
32 |
|
33 |
.table-task-list tbody tr.selected {
|
34 |
+
background-color: #e9ecef !important;
|
35 |
}
|
36 |
|
37 |
.table-task-list, .table-task-detail {
|
|
|
97 |
text-align: center;
|
98 |
border-left: 1px solid #ddd;
|
99 |
border-top: 1px solid #ddd;
|
100 |
+
max-width: 300px;
|
101 |
}
|
102 |
|
103 |
.tabs {
|
|
|
161 |
text-align: center;
|
162 |
}
|
163 |
#header_content{
|
|
|
|
|
164 |
font-size:15px;
|
165 |
}
|
166 |
.detail-div
|
|
|
171 |
margin-top:30px;
|
172 |
}
|
173 |
a:link, a:visited, a:hover, a:active {
|
174 |
+
color: #1d4ed8;
|
175 |
}
|
176 |
.toggle-button{
|
177 |
cursor:pointer;
|
178 |
background-color: white;
|
179 |
border:1px solid #ccc;
|
180 |
padding:5px 8px;
|
181 |
+
margin: 0px 10px 0px 0px;
|
182 |
}
|
183 |
.fas{
|
184 |
color:#3fb9ae;
|
|
|
189 |
</style>
|
190 |
</head>
|
191 |
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
<div class="header">
|
193 |
<div id="header_title"><h2>๐
Korean AI leaderboard</h2></div>
|
194 |
<div id="header_content"><p>[2024 ๊ตญ๋ฆฝ๊ตญ์ด์ ์ธ๊ณต ์ง๋ฅ ์ธ์ด ๋ฅ๋ ฅ ํ๊ฐ]</p>
|
|
|
319 |
$('.tab-link').click(function () {
|
320 |
var selectedTab = $(this).attr('id').split('-')[1];
|
321 |
now_task = selectedTab;
|
|
|
322 |
$('.tab-link').removeClass('active');
|
323 |
$(this).addClass('active');
|
324 |
|
|
|
335 |
function getRow(checked_task){
|
336 |
postdata = {"checked_progress":checked_task}
|
337 |
var clCd = (now_task === "progress") ? "ING_TASK" : "END_TASK";
|
|
|
|
|
338 |
var url = "https://kli.korean.go.kr/benchmark/taskOrdtm/useTaskOrdtmListData.do?clCd="+clCd+"&siteType=USERLIST&partInYN=N"
|
339 |
$.ajax({
|
340 |
type: 'GET',
|
|
|
342 |
dataType: 'JSON',
|
343 |
contentType: "application/json; charset=utf-8",
|
344 |
success: function(response) {
|
|
|
345 |
var tableBody = (checked_task === "progress") ? $('#table-progress tbody') : $('#table-past tbody');
|
346 |
tableBody.empty(); // ๊ธฐ์กด ๋ด์ฉ์ ๋น์๋๋ค.
|
347 |
var rowNum = 0
|
|
|
349 |
response.forEach(function(item) {
|
350 |
// console.log(item['taskOrdtmNm'])
|
351 |
rowNum = rowNum + 1
|
352 |
+
var row = $('<tr>').attr('data-taskid', item['taskOrdtmId']);
|
353 |
// var row = $('<tr>');
|
354 |
row.append($('<td>').text(rowNum)); // No
|
355 |
row.append($('<td>').text(item['taskOrdtmNm'])); // ๊ณผ์ ๋ช
|
|
|
366 |
TaskRowClicked(taskId); // ๊ณผ์ ์๋ณ ID๋ฅผ ์ธ์๋ก ๋๊ฒจ์ฃผ๋ฉด์ ํจ์ ์คํ
|
367 |
});
|
368 |
});
|
369 |
+
$('#task-' + now_task).show();
|
|
|
370 |
},
|
371 |
error: function(request, status, error) {
|
372 |
alert('ajax ํต์ ์คํจ');
|
|
|
381 |
}
|
382 |
|
383 |
function TaskRowClicked(taskId) {
|
|
|
|
|
384 |
$.ajax({
|
385 |
// type: 'POST',
|
386 |
type: 'GET',
|
387 |
url: 'https://kli.korean.go.kr/benchmark/taskOrdtm/taskLeaderBoardData.do?taskOrdtmId='+taskId,
|
|
|
388 |
dataType: 'JSON',
|
389 |
contentType: "application/json",
|
390 |
success: function(response) {
|
|
|
394 |
hrArea.html("<br><br><hr class=\"custom-hr\"><br>");
|
395 |
|
396 |
|
397 |
+
//task์ ๋ํ ์ ๋ณด
|
398 |
var noticeDetail = now_task === "progress" ? $('#task-progress-notice-div') : $('#task-past-notice-div');
|
399 |
var taskNameDiv = noticeDetail.find('.notice-task-name');
|
400 |
var taskPeriodDiv = noticeDetail.find('.notice-task-period');
|
|
|
412 |
taskPeriodDiv.html(response.taskOrdtmInfo.taskOrdtmBgngDt + " - " + response.taskOrdtmInfo.taskOrdtmEndDt);
|
413 |
if (formattedTaskInfo != null){
|
414 |
|
|
|
|
|
|
|
415 |
taskInfoDiv.html(formattedTaskInfo);
|
416 |
}
|
417 |
else{
|
|
|
421 |
var tableTitle = now_task === "progress" ? $('#table-progress-detail-title') : $('#table-past-detail-title');
|
422 |
tableTitle.empty();
|
423 |
tableTitle.html("<br><br><hr class=\"custom-hr\"><br><h1>์์ํ</h1><br><br>");
|
424 |
+
|
425 |
var tableDetail = now_task === "progress" ? $('#table-progress-detail') : $('#table-past-detail');
|
|
|
426 |
var thead = tableDetail.find('thead');
|
427 |
var tbody = tableDetail.find('tbody');
|
428 |
|
429 |
+
tableDetail.show();
|
430 |
+
tableDetail.css("display", "table");
|
431 |
|
432 |
+
// ํค๋๋ฅผ ์
๋ฐ์ดํธ
|
433 |
+
thead.empty();
|
434 |
var headerRow = $('<tr>');
|
435 |
|
436 |
+
|
437 |
+
if (response.leaderboard != null) {
|
438 |
var leaderboard = response.leaderboard;
|
439 |
|
440 |
+
//ํค๋ ์ธํ
|
441 |
var detailKeys = leaderboard[0].taskOrdtmModels[0].taskOrdtmScore.taskOrdtmItemScores[0].taskOrdtmItemIdxScores.map(function(item) {
|
442 |
return item.taskOrdtmItemIdx.idxNm;
|
443 |
});
|
|
|
|
|
444 |
var headers = ["Rank", "Team", "Model Name", "Evaluation Score"].concat(detailKeys, "Submit Date");
|
445 |
var headerRow = $('<tr>');
|
446 |
headers.forEach(function(headerTitle) {
|
447 |
headerRow.append($('<th>').text(headerTitle));
|
448 |
});
|
449 |
|
|
|
450 |
thead.append(headerRow);
|
451 |
tbody.empty();
|
452 |
|
|
|
472 |
// Model name
|
473 |
row.append($('<td>').text(decodeHtml(model.modelNm)));
|
474 |
|
475 |
+
// Evaluation score
|
476 |
row.append($('<td>').text(parseFloat(model.score).toFixed(7)).css('color', '#ee3a49'));
|
477 |
|
478 |
// Detail scores
|
|
|
483 |
row.append($('<td>').text(score));
|
484 |
});
|
485 |
|
|
|
486 |
var submitDate = new Date(model.sbmsnDt);
|
487 |
var formattedDate = submitDate.getFullYear() + '.' +
|
488 |
('0' + (submitDate.getMonth() + 1)).slice(-2) + '.' +
|
|
|
491 |
('0' + submitDate.getMinutes()).slice(-2);
|
492 |
row.append($('<td>').text(formattedDate));
|
493 |
|
|
|
494 |
tbody.append(row);
|
495 |
+
|
496 |
if (modelIndex !== 0) {
|
497 |
row.hide();
|
498 |
}
|