diff --git a/gemini.html b/gemini.html index c0701d6..b9306a9 100644 --- a/gemini.html +++ b/gemini.html @@ -30,7 +30,7 @@ const genTimes=await fetch('./results.json').then(r=>r.json()); const models=readme.match(/\n([\s\S]+?)\n/)[1].trim().split('\n').filter(Boolean); const tests=[...new Set(Object.values(genTimes).flatMap(Object.keys))].sort(); - let [wSum, wTot] = [0, 0]; + const stats=[]; for(const model of models){ const sModel=model.replace(/[\/:]/g,'_'); @@ -69,18 +69,20 @@ li.innerHTML=`${status} ${test}${time.toFixed(3)}s`; } const ratio=tests.length?passed/tests.length:0; - if(!isNaN(tVal)){wSum+=tVal*ratio;wTot+=ratio;} + if(!isNaN(tVal))stats.push({t:tVal,r:ratio}); const grade=gradeOf(ratio); const scoreLi=document.createElement('li'); scoreLi.className='mt-3 pt-3 border-t border-gray-200 flex items-center text-sm justify-between'; scoreLi.innerHTML=`Score${passed}/${tests.length}${grade}`; list.appendChild(scoreLi); } - if(wTot>0){ - const optimal=(wSum/wTot).toFixed(4); + if(stats.length){ + const max=Math.max(...stats.map(x=>x.r)); + const best=stats.filter(x=>x.r===max); + const optimal=(best.reduce((a,c)=>a+c.t,0)/best.length).toFixed(2); const statDiv=document.createElement('div'); statDiv.className='mt-8 p-6 bg-white rounded-2xl border border-gray-200 shadow-sm text-center'; - statDiv.innerHTML=`

Optimal Temperature

${optimal}
Weighted Center of Correctness
`; + statDiv.innerHTML=`

Optimal Temperature

${optimal}
Avg of Peak Performance (${(max*100).toFixed(0)}%)
`; container.appendChild(statDiv); } })();