Spaces:
Running
Running
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>π Korean AI leaderboard</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> | |
<style> | |
body { | |
font-family: "Noto Sans KR", "Malgun Gothic", "λ§μ κ³ λ", Dotum, "λμ", sans-serif; | |
margin: 0; | |
padding: 0; | |
/*background-color: #f4f4f4;*/ | |
color: #333; | |
margin-left: 10%; | |
margin-right: 10%; | |
} | |
.header { | |
background-color: #fff; | |
/*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/ | |
padding: 20px; | |
} | |
.content { | |
/*margin: 20px;*/ | |
padding: 20px; | |
background-color: #fff; | |
border-radius: 8px; | |
/*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/ | |
} | |
.table-task-list tbody tr.selected { | |
background-color: #e9ecef ; | |
} | |
.table-task-list, .table-task-detail { | |
width: 100%; | |
border-collapse: collapse; | |
border-spacing: 0; | |
border: 1px solid #e5e7eb; | |
margin-top: 20px; /* λ ν μ΄λΈ μ¬μ΄μ 곡백 μΆκ° */ | |
} | |
.table-task-list thead, .table-task-detail thead { | |
background-color: white; | |
color: black; | |
font-weight: bold; | |
text-align: left; | |
} | |
.table-task-list td{ | |
border-top: none; | |
border-bottom: none; | |
border-left: 1px solid #e5e7eb; | |
padding: 8px; | |
text-align: left; | |
} | |
.table-task-list td:last-child{ | |
border-right: 1px solid #e5e7eb; | |
} | |
.table-task-list tbody tr:hover{ | |
background-color: #f1f1f1; | |
cursor: pointer; | |
} | |
.table-task-list tbody tr:nth-child(odd){ | |
background-color: #f9fafb; | |
} | |
.table-task-list tbody tr:nth-child(even){ | |
background-color: white; | |
} | |
.no-border{ | |
border-top: 0px ; | |
} | |
.table-task-detail thead tr th{ | |
padding:20px 10px; | |
text-align: center; | |
border-left: 1px solid #ddd; | |
border-bottom: 1px solid #ddd; | |
} | |
.table-task-detail thead{ | |
color:#111; | |
background-color: #f6f6f6; | |
border-left: 1px solid #ddd; | |
border-top: 1px solid #292f38; | |
} | |
.table-task-detail td{ | |
color: #111; | |
padding:20px 10px; | |
text-align: center; | |
border-left: 1px solid #ddd; | |
border-top: 1px solid #ddd; | |
max-width: 300px; | |
} | |
.tabs { | |
display: flex; | |
margin-bottom: 0; | |
border-bottom: 1px solid #e5e7eb; | |
} | |
.tab-link { | |
font-size: 20px; | |
padding: 10px 20px; | |
color: darkgray; | |
background-color: #fff; | |
border: 1px solid #e5e7eb; | |
border-bottom: none; | |
border-radius: 5px 5px 0 0; | |
margin-right: 5px; | |
cursor: pointer; | |
position: relative; | |
transition: color 0.3s, background-color 0.3s; | |
} | |
.tab-link.active { | |
color: black; | |
z-index: 1; | |
margin-bottom: -1px; | |
} | |
.tab-content { | |
border: 1px solid #e5e7eb; | |
border-top: none; | |
padding: 10px; | |
position: relative; | |
} | |
.tab-link:hover { | |
color: black; | |
} | |
.notice-task-name{ | |
margin: 0px 0px 15px 0px; | |
} | |
.notice-task-period{ | |
font-weight: 500; | |
font-size:20px; | |
} | |
.custom-hr { | |
border: none; | |
height: 1px; | |
background-color: #e5e7eb; | |
margin-top: 20px; | |
margin-bottom: 20px; | |
} | |
.circle-list { | |
list-style-type: circle; | |
margin-left: -20px; | |
} | |
#header_title{ | |
text-align: center; | |
} | |
#header_content{ | |
font-size:15px; | |
} | |
.detail-div | |
{margin-left:2%;} | |
.task-notice-div{ | |
} | |
.notice-task-info{ | |
margin-top:30px; | |
} | |
a:link, a:visited, a:hover, a:active { | |
color: #1d4ed8; | |
} | |
.toggle-button{ | |
cursor:pointer; | |
background-color: white; | |
border:1px solid #ccc; | |
padding:5px 8px; | |
margin: 0px 10px 0px 0px; | |
} | |
.fas{ | |
color:#3fb9ae; | |
} | |
.rank-class{ | |
text-align: left ; | |
} | |
.table-div{ | |
height: 200px; | |
overflow: auto; | |
} | |
.custom-list { | |
list-style-type: none; /* κΈ°λ³Έ λͺ©λ‘ μ€νμΌ μ κ±° */ | |
padding-left: 0; /* μΌμͺ½ ν¨λ© μ κ±° */ | |
} | |
.custom-list > li:before { | |
content: counter(item) ") "; /* λ²νΈμ κ΄νΈλ₯Ό μΆκ° */ | |
counter-increment: item; /* λ²νΈ μ¦κ° */ | |
} | |
.custom-list { | |
counter-reset: item; /* λͺ©λ‘ μμ μ μΉ΄μ΄ν° 리μ */ | |
} | |
.sub-list { | |
list-style: none; /* νμ λͺ©λ‘ μ€νμΌ μ κ±° */ | |
padding-left: 20px; /* νμ λͺ©λ‘ μΌμͺ½ ν¨λ© μΆκ° */ | |
} | |
.sub-list li:before { | |
content: "- "; /* νμ΄ν μΆκ° */ | |
} | |
</style> | |
</head> | |
<body> | |
<div class="header"> | |
<div id="header_title"><h2>π Korean AI Malpyeong leaderboard</h2></div> | |
<br><br> | |
<ul class="circle-list"> | |
<li>Korean AI Malpyeong Leaderboard(μΈκ³΅μ§λ₯(AI)λ§ν)λ κ΅λ¦½κ΅μ΄μμ νκ΅μ΄ λ₯λ ₯ νκ° μ²΄κ³μ λλ€.</li><br><br> | |
<li>μΈκ³΅μ§λ₯(AI)λ§νμμ '2024 μΈκ³΅μ§λ₯μ νκ΅μ΄ λ₯λ ₯ νκ°' κ²½μ§ λνλ₯Ό κ°μ΅ν©λλ€.<br> | |
<ol class="custom-list"><br> | |
<li>μ£Όμ : μΈκ³΅μ§λ₯, λνμ λ§₯λ½μ μ½κ³ ν΅μ¬μ μμ½νλ€</li><br> | |
<li>νκ° κ³Όμ :<br> | |
<ul class="sub-list"><br> | |
<li>λν λ§₯λ½ μΆλ‘ : λ°νμ λ§₯λ½μ μ ννκ² μΆλ‘ ν λ¬Έμ₯μ μ ννλ κ³Όμ </li><br> | |
<li>μΌμ λν μμ½: λ€μκ° λνμμ μ£Όμ λ³ μμ½λ¬Έμ μμ±νλ κ³Όμ </li><br> | |
</ul> | |
</li> | |
<li>μ μ κΈ°κ°: 2024. 7. 1. (μ) ~ 2024. 8. 23. (κΈ)</li><br> | |
<li>μ μΆ λ°©λ²: <a href="https://kli.korean.go.kr/benchmark/home.do">κ΅λ¦½κ΅μ΄μ μΈκ³΅μ§λ₯(AI)λ§ν</a>μμ μ μΆ</li> | |
</ol> | |
</li> | |
μ μ, μ κ΄λ ¨ | |
π―π₯π₯π₯π ππ | |
μ± κ΄λ ¨ | |
ππππππππππππππ°π§Ύππ | |
ν κ΄λ ¨ | |
βββππππ | |
μΈλ¬Ό κ΄λ ¨ | |
π§ | |
π©βππ¨βπ | |
π©βπ«π¨βπ« | |
π©βπ»π¨βπ» | |
μ½λ© κ΄λ ¨ | |
π»π₯ | |
λͺ©μ κ΄λ ¨ | |
ππ³π΄π© | |
μ΄μΈ νμ© κ°λ₯ | |
π¬ππππ’π£π | |
</ul> | |
</div> | |
</div> | |
<div class="content"> | |
<div class="tabs"> | |
<div class="tab-link active" id="title-progress">π μ§ν μ€ κ³Όμ </div> | |
<div class="tab-link" id="title-past">π μ§λ κ³Όμ </div> | |
</div> | |
<div class="tab tab-content" id = "task-progress"> | |
<div class="table-div"> | |
<table id = "table-progress" class="table-task-list"> | |
<thead> | |
<tr> | |
<td>No</td> | |
<td>κ³Όμ λͺ </td> | |
<td>κ³Όμ λΆλ₯</td> | |
<td>κ³Όμ κΈ°κ°</td> | |
<td>κ³Όμ μν</td> | |
</tr> | |
</thead> | |
<tbody> | |
</tbody> | |
</table> | |
</div> | |
<div id="hr-area-progress"></div> | |
<div class="detail-div"> | |
<h1 class= "notice-task-name" id= "notice-task-name-progress"></h1> | |
<span class= "notice-task-period" id= "notice-task-period-progress"></span> | |
<div id= "table-progress-detail-title"></div> | |
<div id="table-progress-detail-info"></div> | |
<table id = "table-progress-detail" class="table-task-detail" style="display:none;"> | |
<thead> | |
<tr> | |
</tr> | |
</thead> | |
<tbody> | |
</tbody> | |
</table> | |
<div id="task-progress-notice-div" class= "task-notice-div"> | |
<div class= "notice-task-info"></div> | |
</div> | |
</div> | |
</div> | |
<div class="tab tab-content" id= "task-past" style="display:none;"> | |
<div class="table-div"> | |
<table id = "table-past" class="table-task-list"> | |
<thead> | |
<tr> | |
<td>No</td> | |
<td>κ³Όμ λͺ </td> | |
<td>κ³Όμ λΆλ₯</td> | |
<td>κ³Όμ κΈ°κ°</td> | |
<td>κ³Όμ μν</td> | |
</tr> | |
</thead> | |
<tbody> | |
</tbody> | |
</table> | |
</div> | |
<div id= "hr-area-past"></div> | |
<div class="detail-div"> | |
<h1 class= "notice-task-name" id= "notice-task-name-past"></h1> | |
<span class= "notice-task-period" id= "notice-task-period-past"></span> | |
<div id= "table-past-detail-title"></div> | |
<div id="table-past-detail-info"></div> | |
<table id = "table-past-detail" class="table-task-detail" style="display:none;"> | |
<thead> | |
<tr> | |
</tr> | |
</thead> | |
<tbody> | |
</tbody> | |
</table> | |
<div id="task-past-notice-div" class= "task-notice-div"> | |
<h1 class= "notice-task-name"></h1> | |
<span class= "notice-task-period"></span> | |
<div class= "notice-task-info"></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
<script> | |
var taskOrdtmStatusCdMap = { | |
TEMP_STOR: "μμ μ μ₯", | |
REG_COMP: "λ±λ‘ μλ£", | |
PUB_COMP: "κ³΅κ³ μλ£", | |
OPER_ING: "κ³Όμ μ΄μ μ€", | |
OPER_END: "κ³Όμ μ’ λ£", | |
OPER_WAIT: "μ΄μμ νμΈ λκΈ°", | |
SUB_END: "μ μΆ λκΈ°", | |
OKAY_ING: "μΉμΈ μμ² μ€", | |
OKAY_END: "μΉμΈ μλ£", | |
OKAY_FAIL: "μ μΆ λ°λ €", | |
RE_OKAY_ING: "μ¬μΉμΈ μμ² μ€", | |
RE_OKAY_FAIL: "μ¬μΉμΈ λ°λ €", | |
DELETE: "μμ " | |
}; | |
var taskOrdtmTyCdMap = { | |
PRER: "μ¬μ 곡κ°", | |
CPTHB: "κ²½μ§ λν", | |
ORDTM: "μμ κ³Όμ ", | |
ACADEMCON: "νμ λν", | |
TRIRUN: "μλ² μ΄μ" | |
}; | |
now_task = "progress" | |
$(document).ready(function() { | |
getRow(now_task); | |
$('.tab-link').click(function () { | |
var selectedTab = $(this).attr('id').split('-')[1]; | |
now_task = selectedTab; | |
$('.tab-link').removeClass('active'); | |
$(this).addClass('active'); | |
$('.tab').hide(); | |
getRow(now_task); | |
}); | |
$('.table-task-list tbody').on('click', 'tr', function() { | |
$('.table-task-list tr').removeClass('selected'); | |
$(this).addClass('selected'); | |
}); | |
}); | |
function getRow(checked_task){ | |
postdata = {"checked_progress":checked_task} | |
var clCd = (now_task === "progress") ? "ING_TASK" : "END_TASK"; | |
var url = "https://kli.korean.go.kr/benchmark/taskOrdtm/useTaskOrdtmListData.do?clCd="+clCd+"&siteType=USERLIST&partInYN=N" | |
$.ajax({ | |
type: 'GET', | |
url: url, | |
dataType: 'JSON', | |
contentType: "application/json; charset=utf-8", | |
success: function(response) { | |
var tableBody = (checked_task === "progress") ? $('#table-progress tbody') : $('#table-past tbody'); | |
tableBody.empty(); // κΈ°μ‘΄ λ΄μ©μ λΉμλλ€. | |
var rowNum = 0 | |
response.forEach(function(item) { | |
rowNum = rowNum + 1 | |
var row = $('<tr>').attr('data-taskid', item['taskOrdtmId']); | |
// var row = $('<tr>'); | |
row.append($('<td>').text(rowNum)); // No | |
row.append($('<td>').text(item['taskOrdtmNm'])); // κ³Όμ λͺ | |
row.append($('<td>').text(taskOrdtmTyCdMap[item['taskOrdtmTyCd']])); // κ³Όμ λΆλ₯(μ¬μ κ³΅κ° λ±) | |
row.append($('<td>').text(item['taskOrdtmBgngDt'] + " - " + item['taskOrdtmEndDt'])); // κ³Όμ κΈ°κ° | |
row.append($('<td>').text(taskOrdtmStatusCdMap[item['taskOrdtmStatusCd']])); // κ³Όμ μν (μ¬μ 곡κ°μ€ λ±) | |
tableBody.append(row); | |
// ν΄λ¦ μ΄λ²€νΈ μΆκ° | |
row.on('click', function() { | |
$('tr').removeClass('selected'); | |
$(this).addClass('selected'); | |
var taskId = $(this).data('taskid'); // data-taskid μμ±μμ κ³Όμ μλ³ ID κ°μ Έμ€κΈ° | |
TaskRowClicked(taskId); // κ³Όμ μλ³ IDλ₯Ό μΈμλ‘ λ겨주면μ ν¨μ μ€ν | |
}); | |
}); | |
$('#task-' + now_task).show(); | |
}, | |
error: function(request, status, error) { | |
alert('ajax ν΅μ μ€ν¨'); | |
alert(error); | |
} | |
}) | |
} | |
function decodeHtml(html) { | |
var txt = document.createElement("textarea"); | |
txt.innerHTML = html; | |
return txt.value; | |
} | |
function TaskRowClicked(taskId) { | |
$.ajax({ | |
// type: 'POST', | |
type: 'GET', | |
url: 'https://kli.korean.go.kr/benchmark/taskOrdtm/taskLeaderBoardData.do?taskOrdtmId='+taskId, | |
dataType: 'JSON', | |
contentType: "application/json", | |
success: function(response) { | |
var hrArea = now_task === "progress" ? $('#hr-area-progress') : $('#hr-area-past'); | |
hrArea.empty(); | |
hrArea.html("<br><br><hr class=\"custom-hr\"><br>"); | |
//taskμ λν μ 보 | |
var noticeDetail = now_task === "progress" ? $('#task-progress-notice-div') : $('#task-past-notice-div'); | |
var taskNameDiv = "" | |
var taskPeriodDiv = "" | |
if (now_task == "progress"){ | |
taskNameDiv = $('#notice-task-name-progress'); | |
taskPeriodDiv = $('#notice-task-period-progress'); | |
} | |
else{ | |
taskNameDiv = $('#notice-task-name-past'); | |
taskPeriodDiv = $('#notice-task-period-past'); | |
} | |
var taskInfoDiv = noticeDetail.find('.notice-task-info'); | |
taskNameDiv.empty(); | |
taskPeriodDiv.empty(); | |
taskInfoDiv.empty(); | |
var formattedTaskInfo = response.taskOrdtmInfo.description; | |
formattedTaskInfo = decodeHtml(formattedTaskInfo) | |
taskNameDiv.html(response.taskOrdtmInfo.name); | |
taskPeriodDiv.html(response.taskOrdtmInfo.taskOrdtmBgngDt + " - " + response.taskOrdtmInfo.taskOrdtmEndDt); | |
if (formattedTaskInfo != null){ | |
taskInfoDiv.html(formattedTaskInfo); | |
} | |
else{ | |
taskInfoDiv.html("κ³Όμ κ°μκ° μ‘΄μ¬νμ§ μμ΅λλ€."); | |
} | |
var tableTitle = now_task === "progress" ? $('#table-progress-detail-title') : $('#table-past-detail-title'); | |
tableTitle.empty(); | |
// tableTitle.html("<br><br><hr class=\"custom-hr\"><br><h1>μμν</h1><br><br>"); | |
tableTitle.html("<br><br><span style='font-size:18pt; font-weight:bold; font-family: /'λλκ³ λμ½λ©, NanumGothicCoding, sans-serif/' '><br>μμν<br></span><br><br>"); | |
var tableDetail = now_task === "progress" ? $('#table-progress-detail') : $('#table-past-detail'); | |
var thead = tableDetail.find('thead'); | |
var tbody = tableDetail.find('tbody'); | |
tableDetail.show(); | |
tableDetail.css("display", "table"); | |
// ν€λλ₯Ό μ λ°μ΄νΈ | |
thead.empty(); | |
var headerRow = $('<tr>'); | |
if (response.leaderboard != null) { | |
var leaderboard = response.leaderboard; | |
//ν€λ μΈν | |
var detailKeys = leaderboard[0].taskOrdtmModels[0].taskOrdtmScore.taskOrdtmItemScores[0].taskOrdtmItemIdxScores.map(function(item) { | |
return item.taskOrdtmItemIdx.idxNm; | |
}); | |
var headers = ["Rank", "Team", "Model Name", "Evaluation Score"].concat(detailKeys, "Submit Date"); | |
var headerRow = $('<tr>'); | |
headers.forEach(function(headerTitle) { | |
headerRow.append($('<th>').text(headerTitle)); | |
}); | |
thead.append(headerRow); | |
tbody.empty(); | |
var rank = 0; | |
leaderboard.forEach(function (team) { | |
rank += 1; | |
var models = team.taskOrdtmModels; | |
var teamClass = 'team-' + team.teamNo; | |
models.forEach(function (model, modelIndex) { | |
var row = $('<tr>').addClass(teamClass); | |
if (modelIndex === 0) { | |
var toggleButton = $('<button>').addClass('toggle-button'); | |
toggleButton.append('<i class="fas fa-chevron-down"></i>'); // Use FontAwesome icon | |
row.append($('<td>').addClass('rank-class').append(toggleButton).append($('<span>').text(rank))); | |
row.append($('<td>').text(team.teamNm)); | |
} else { | |
row.append($('<td>').addClass('no-border').text('')); | |
row.append($('<td>').addClass('no-border').text('')); | |
} | |
// Model name | |
row.append($('<td>').text(decodeHtml(model.modelNm))); | |
// Evaluation score | |
row.append($('<td>').text(parseFloat(model.score).toFixed(7)).css('color', '#ee3a49')); | |
// Detail scores | |
var scores = model.taskOrdtmScore.taskOrdtmItemScores[0].taskOrdtmItemIdxScores; | |
detailKeys.forEach(function (key) { | |
var scoreDetail = scores.find(s => s.taskOrdtmItemIdx.idxNm === key); | |
var score = scoreDetail ? parseFloat(scoreDetail.score).toFixed(7) : 'N/A'; | |
row.append($('<td>').text(score)); | |
}); | |
var submitDate = new Date(model.sbmsnDt); | |
var formattedDate = submitDate.getFullYear() + '.' + | |
('0' + (submitDate.getMonth() + 1)).slice(-2) + '.' + | |
('0' + submitDate.getDate()).slice(-2) + '. ' + | |
('0' + submitDate.getHours()).slice(-2) + ':' + | |
('0' + submitDate.getMinutes()).slice(-2); | |
row.append($('<td>').text(formattedDate)); | |
tbody.append(row); | |
if (modelIndex !== 0) { | |
row.hide(); | |
} | |
}); | |
$('.' + teamClass + ' .toggle-button').click(function() { | |
var icon = $(this).find('i'); | |
var isExpanded = icon.hasClass('fa-chevron-down'); | |
icon.toggleClass('fa-chevron-down', !isExpanded).toggleClass('fa-chevron-up', isExpanded); | |
$('.' + teamClass + ':not(:first)').toggle(); | |
}); | |
}); | |
} | |
//μμ§ μμνκ° μλ κ²½μ° | |
else{ | |
var tableInfoDiv = now_task === "progress" ? $('#table-progress-detail-info') : $('#table-past-detail-info'); | |
tableInfoDiv.html("λ±λ‘λ μμκ° μμ΅λλ€.") | |
} | |
}, | |
error: function(xhr, status, error) { | |
alert('Error: ' + error.message); | |
} | |
}); | |
} | |
</script> | |
</html> | |