Skip to content

Commit

Permalink
refactor: style (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
soryxie authored Apr 24, 2024
1 parent fdc5e7e commit 741484f
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions repoqa.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h3 class="text-nowrap mt-5">πŸ† Benchmark @ 16K Code Context</h3>
'#', // rank
'Model', // model name
'Context (16K)', // context chart
'Score (%)', // score of each language
'Score (%)', // score of each language
]

const lang_map = {
Expand All @@ -199,6 +199,7 @@ <h3 class="text-nowrap mt-5">πŸ† Benchmark @ 16K Code Context</h3>
// headers
theaders.forEach(function (header) {
var th = document.createElement('th');
th.classList.add('text-nowrap');
if (header == "Context (16K)") {
th.colSpan = 2;
}
Expand All @@ -213,7 +214,6 @@ <h3 class="text-nowrap mt-5">πŸ† Benchmark @ 16K Code Context</h3>
var rank = 0;
data.forEach((row) => {
rowspan = Object.keys(row['results']).length + 1;
eval_size = row["eval_size"];
var dataRow = document.createElement('tr');
// rank
var rankCell = document.createElement('td');
Expand All @@ -224,17 +224,16 @@ <h3 class="text-nowrap mt-5">πŸ† Benchmark @ 16K Code Context</h3>
// model name
var modelCell = document.createElement('td');
modelCell.rowSpan = rowspan;
var modelLink = document.createElement('a');
if (rank == 1) {
modelCell.textContent = 'πŸ₯‡ ';
modelLink.textContent = 'πŸ₯‡ ' + row['Model'];
} else if (rank == 2) {
modelCell.textContent = 'πŸ₯ˆ ';
modelLink.textContent = 'πŸ₯ˆ ' + row['Model'];
} else if (rank == 3) {
modelCell.textContent = 'πŸ₯‰ ';
modelLink.textContent = 'πŸ₯‰ ' + row['Model'];
} else {
modelCell.textContent = '';
modelLink.textContent = row['Model'];
}
var modelLink = document.createElement('a');
modelLink.textContent = row['Model'];
if(linkMapping.has(row['Model'])){
modelLink.href = linkMapping.get(row["Model"]);
}
Expand Down Expand Up @@ -321,7 +320,7 @@ <h3 class="text-nowrap mt-5">πŸ† Benchmark @ 16K Code Context</h3>
symbol: 'none',
lineStyle: {
color: correctColor + ', 0.4)',
width: 1
width: 0
},
markLine: {
symbol: ['none', 'none'],
Expand All @@ -336,7 +335,7 @@ <h3 class="text-nowrap mt-5">πŸ† Benchmark @ 16K Code Context</h3>
symbol: 'none',
lineStyle: {
color: incorrectColor + ', 0.4)',
width: 1
width: 0
},
markLine: {
symbol: ['none', 'none'],
Expand Down Expand Up @@ -457,7 +456,7 @@ <h3 class="text-nowrap mt-5">πŸ† Benchmark @ 16K Code Context</h3>
document.addEventListener('DOMContentLoaded', function () {
var slider = document.getElementById('fixedPointSlider');
var output = document.getElementById('sliderValue');
slider.addEventListener('input', function () {
slider.addEventListener('change', function () {
var sliderValue = this.value;
output.textContent = (sliderValue / 10).toFixed(1);
scoreThresh = (sliderValue / 10).toFixed(1);
Expand Down

0 comments on commit 741484f

Please sign in to comment.