Update frontend/src/App.js
Browse files- frontend/src/App.js +7 -4
frontend/src/App.js
CHANGED
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
|
2 |
import { chain } from 'lodash';
|
3 |
import './App.css';
|
4 |
|
5 |
-
const ScoreBar = ({ score }) => {
|
6 |
if (score === undefined || score === null) return null;
|
7 |
|
8 |
const percentage = score <= 1 ? score * 100 : score;
|
@@ -15,7 +15,10 @@ const ScoreBar = ({ score }) => {
|
|
15 |
className="score-fill"
|
16 |
style={{
|
17 |
width: `${percentage}%`,
|
18 |
-
backgroundColor
|
|
|
|
|
|
|
19 |
}}
|
20 |
/>
|
21 |
<span className="score-text">
|
@@ -161,9 +164,9 @@ const App = () => {
|
|
161 |
</td>
|
162 |
{["Average", "GAIA", "MATH", "SimpleQA"].map(metric => (
|
163 |
<td key={metric}>
|
164 |
-
<ScoreBar score={item.scores[metric]} />
|
165 |
{showVanilla && getVanillaScore(item.model_id, metric) !== undefined && (
|
166 |
-
<ScoreBar score={getVanillaScore(item.model_id, metric)} />
|
167 |
)}
|
168 |
</td>
|
169 |
))}
|
|
|
2 |
import { chain } from 'lodash';
|
3 |
import './App.css';
|
4 |
|
5 |
+
const ScoreBar = ({ score, isVanilla = false }) => {
|
6 |
if (score === undefined || score === null) return null;
|
7 |
|
8 |
const percentage = score <= 1 ? score * 100 : score;
|
|
|
15 |
className="score-fill"
|
16 |
style={{
|
17 |
width: `${percentage}%`,
|
18 |
+
backgroundColor,
|
19 |
+
height: isVanilla ? '6px' : '12px', // Make vanilla bars thinner with inline style
|
20 |
+
borderRadius: isVanilla ? '0' : '4px' // Make vanilla bars square
|
21 |
+
opacity: isVanilla ? 0.6 : 1 // Dim vanilla score bars
|
22 |
}}
|
23 |
/>
|
24 |
<span className="score-text">
|
|
|
164 |
</td>
|
165 |
{["Average", "GAIA", "MATH", "SimpleQA"].map(metric => (
|
166 |
<td key={metric}>
|
167 |
+
<ScoreBar score={item.scores[metric]} isVanilla=false/>
|
168 |
{showVanilla && getVanillaScore(item.model_id, metric) !== undefined && (
|
169 |
+
<ScoreBar score={getVanillaScore(item.model_id, metric)} isVanilla=true/>
|
170 |
)}
|
171 |
</td>
|
172 |
))}
|