RafaelJaime commited on
Commit
4bf7fef
Β·
verified Β·
1 Parent(s): f0a99c9

Update src/App.js

Browse files
Files changed (1) hide show
  1. src/App.js +430 -217
src/App.js CHANGED
@@ -173,10 +173,12 @@ const UrologyLeaderboard = () => {
173
 
174
  const getRankIcon = (index) => {
175
  switch(index) {
176
- case 0: return <span className="text-2xl">πŸ†</span>;
177
- case 1: return <span className="text-2xl">πŸ₯ˆ</span>;
178
- case 2: return <span className="text-2xl">πŸ₯‰</span>;
179
- default: return <span className="text-xl font-bold text-gray-500">#{index + 1}</span>;
 
 
180
  }
181
  };
182
 
@@ -202,238 +204,449 @@ const UrologyLeaderboard = () => {
202
  };
203
 
204
  const getSortIcon = (column) => {
205
- if (sortBy !== column) return <span className="text-gray-400">↕️</span>;
 
 
206
  return sortOrder === 'desc' ?
207
- <span className="text-blue-500">⬇️</span> :
208
- <span className="text-blue-500">⬆️</span>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  };
210
 
211
  if (loading) {
212
- return (
213
- <div className="min-h-screen bg-gradient-to-br from-slate-900 via-blue-900 to-indigo-900 flex items-center justify-center">
214
- <div className="text-center">
215
- <div className="animate-spin rounded-full h-16 w-16 border-b-2 border-white mb-4 mx-auto"></div>
216
- <p className="text-white text-xl">Loading leaderboard...</p>
217
- </div>
218
- </div>
219
  );
220
  }
221
 
222
- return (
223
- <div className="min-h-screen bg-gradient-to-br from-slate-900 via-blue-900 to-indigo-900">
224
- <div className="container mx-auto px-4 py-8">
225
- <div className="text-center mb-8">
226
- <h1 className="text-5xl font-bold text-white mb-4 bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent">
227
- πŸ† Urology AI Leaderboard
228
- </h1>
229
- <p className="text-xl text-gray-300 mb-6">
230
- Evaluating Natural Language Models on Urology Knowledge Assessment
231
- </p>
232
- <div className="flex justify-center space-x-8 text-center">
233
- <div className="bg-white/10 backdrop-blur-sm rounded-lg p-4 border border-white/20">
234
- <div className="text-2xl font-bold text-white">{data.length}</div>
235
- <div className="text-sm text-gray-300">Models</div>
236
- </div>
237
- <div className="bg-white/10 backdrop-blur-sm rounded-lg p-4 border border-white/20">
238
- <div className="text-2xl font-bold text-white">151</div>
239
- <div className="text-sm text-gray-300">Questions</div>
240
- </div>
241
- <div className="bg-white/10 backdrop-blur-sm rounded-lg p-4 border border-white/20">
242
- <div className="text-2xl font-bold text-white">SAS Urology</div>
243
- <div className="text-sm text-gray-300">Specialty</div>
244
- </div>
245
- </div>
246
- </div>
247
-
248
- <div className="mb-6 flex flex-wrap gap-4 items-center justify-between">
249
- <div className="flex flex-wrap gap-4 items-center">
250
- <div className="relative">
251
- <span className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400">πŸ”</span>
252
- <input
253
- type="text"
254
- placeholder="Search model..."
255
- value={searchTerm}
256
- onChange={(e) => setSearchTerm(e.target.value)}
257
- className="pl-10 pr-4 py-2 bg-white/10 backdrop-blur-sm border border-white/20 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
258
- />
259
- </div>
260
-
261
- <div className="relative">
262
- <span className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400">πŸ“‹</span>
263
- <select
264
- value={filterLicense}
265
- onChange={(e) => setFilterLicense(e.target.value)}
266
- className="pl-10 pr-8 py-2 bg-white/10 backdrop-blur-sm border border-white/20 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500 appearance-none"
267
- >
268
- <option value="all">All licenses</option>
269
- <option value="API Service">API Service</option>
270
- <option value="Apache 2.0">Apache 2.0</option>
271
- <option value="MIT">MIT</option>
272
- </select>
273
- </div>
274
- </div>
275
-
276
- <button
277
- onClick={refreshData}
278
- disabled={refreshing}
279
- className="flex items-center space-x-2 px-4 py-2 bg-green-600 hover:bg-green-700 disabled:bg-green-600/50 text-white rounded-lg transition-colors"
280
- >
281
- <span className={refreshing ? 'animate-spin' : ''}>πŸ”„</span>
282
- <span>{refreshing ? 'Updating...' : 'Update'}</span>
283
- </button>
284
- </div>
285
-
286
- <div className="bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 overflow-hidden">
287
- <div className="overflow-x-auto">
288
- <div className="max-h-96 overflow-y-auto">
289
- <table className="w-full">
290
- <thead className="sticky top-0 bg-white/10 backdrop-blur-sm">
291
- <tr className="border-b border-white/10">
292
- <th className="px-6 py-4 text-left text-white font-semibold">Rank</th>
293
- <th className="px-6 py-4 text-left text-white font-semibold">Model</th>
294
- <th
295
- className="px-6 py-4 text-left text-white font-semibold cursor-pointer hover:bg-white/5 transition-colors"
296
- onClick={() => {
 
 
 
 
 
 
 
 
 
 
 
297
  if (sortBy === 'accuracy') {
298
  setSortOrder(sortOrder === 'desc' ? 'asc' : 'desc');
299
  } else {
300
  setSortBy('accuracy');
301
  setSortOrder('desc');
302
  }
303
- }}
304
- >
305
- <div className="flex items-center space-x-1">
306
- <span>🎯</span>
307
- <span>Accuracy</span>
308
- {getSortIcon('accuracy')}
309
- </div>
310
- </th>
311
- <th className="px-6 py-4 text-left text-white font-semibold">Answers</th>
312
- <th className="px-6 py-4 text-left text-white font-semibold">Parameters</th>
313
- <th className="px-6 py-4 text-left text-white font-semibold">License</th>
314
- <th
315
- className="px-6 py-4 text-left text-white font-semibold cursor-pointer hover:bg-white/5 transition-colors"
316
- onClick={() => {
317
  if (sortBy === 'submittedTime') {
318
  setSortOrder(sortOrder === 'desc' ? 'asc' : 'desc');
319
  } else {
320
  setSortBy('submittedTime');
321
  setSortOrder('desc');
322
  }
323
- }}
324
- >
325
- <div className="flex items-center space-x-1">
326
- <span>πŸ•’</span>
327
- <span>Date</span>
328
- {getSortIcon('submittedTime')}
329
- </div>
330
- </th>
331
- </tr>
332
- </thead>
333
- <tbody>
334
- {filteredAndSortedData.map((item, index) => (
335
- <tr
336
- key={item.model}
337
- className="border-b border-white/5 hover:bg-white/5 transition-colors group"
338
- >
339
- <td className="px-6 py-4">
340
- <div className="flex items-center">
341
- {getRankIcon(index)}
342
- </div>
343
- </td>
344
- <td className="px-6 py-4">
345
- <div className="flex flex-col">
346
- <div className="flex items-center space-x-2">
347
- <span className="text-white font-medium">{item.model.split('/').pop()}</span>
348
- <span className="text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer">πŸ”—</span>
349
- </div>
350
- <span className="text-sm text-gray-400">{item.model.split('/')[0]}</span>
351
- </div>
352
- </td>
353
- <td className="px-6 py-4">
354
- <div className="flex items-center space-x-3">
355
- <div className="flex-1">
356
- <div className="flex items-center justify-between mb-1">
357
- <span className="text-white font-semibold">{formatAccuracy(item.accuracy)}</span>
358
- </div>
359
- <div className="w-full bg-gray-700 rounded-full h-2">
360
- <div
361
- className="bg-gradient-to-r from-blue-500 to-purple-500 h-2 rounded-full transition-all duration-500"
362
- style={{ width: `${item.accuracy * 100}%` }}
363
- ></div>
364
- </div>
365
- </div>
366
- </div>
367
- </td>
368
- <td className="px-6 py-4">
369
- <div className="text-center">
370
- <div className="text-white font-semibold">{item.correctAnswers}/{item.totalQuestions}</div>
371
- <div className="text-sm text-gray-400">correct</div>
372
- </div>
373
- </td>
374
- <td className="px-6 py-4">
375
- <div className="flex items-center space-x-2">
376
- <span>⚑</span>
377
- <span className="text-white">{formatParams(item.params)}</span>
378
- </div>
379
- </td>
380
- <td className="px-6 py-4">
381
- <span className={`px-2 py-1 rounded-full text-xs font-medium ${
382
- item.license === 'API Service'
383
- ? 'bg-blue-500/20 text-blue-300'
384
- : item.license === 'Apache 2.0'
385
- ? 'bg-green-500/20 text-green-300'
386
- : 'bg-purple-500/20 text-purple-300'
387
- }`}>
388
- {item.license}
389
- </span>
390
- </td>
391
- <td className="px-6 py-4">
392
- <div className="text-sm text-gray-300">
393
- {formatDate(item.submittedTime)}
394
- </div>
395
- </td>
396
- </tr>
397
- ))}
398
- </tbody>
399
- </table>
400
- </div>
401
- </div>
402
- </div>
403
-
404
- <div className="mt-8 space-y-6">
405
- <div className="bg-white/10 backdrop-blur-sm rounded-lg p-6 border border-white/20">
406
- <h3 className="text-xl font-semibold text-white mb-3">πŸ“Š About This Evaluation</h3>
407
- <p className="text-gray-300 mb-3">
408
- This leaderboard evaluates natural language models on their ability to answer urology questions.
409
- Models must respond to multiple-choice questions about urological knowledge, demonstrating their understanding and mastery of this medical specialty.
410
- </p>
411
- <p className="text-gray-300 mb-4">
412
- Questions are from the SAS (Servicio Andaluz de Salud) for the <strong>Convocatoria Concurso OposiciΓ³n</strong> - specialized medical examination for urology residents.
413
- </p>
414
- <div className="flex flex-col sm:flex-row items-center justify-center space-y-2 sm:space-y-0 sm:space-x-4 text-gray-300">
415
- <span>Dataset: <a href="https://huggingface.co/datasets/SASLeaderboard/results" className="text-blue-400 hover:text-blue-300 transition-colors">SASLeaderboard/results</a></span>
416
- {lastUpdated && (
417
- <span className="text-sm">
418
- Last updated: {lastUpdated.toLocaleString('en-US')}
419
- </span>
420
- )}
421
- </div>
422
- </div>
423
-
424
- <div className="bg-white/10 backdrop-blur-sm rounded-lg p-4 border border-white/20">
425
- <div className="text-center">
426
- <h4 className="text-lg font-semibold text-white mb-2">πŸŽ“ Academic Project</h4>
427
- <p className="text-gray-300 text-sm">
428
- Final project for IES Rafael Alberti<br/>
429
- Course: Artificial Intelligence and Big Data<br/>
430
- Subject: Artificial Intelligence Models
431
- </p>
432
- </div>
433
- </div>
434
- </div>
435
- </div>
436
- </div>
437
  );
438
  };
439
 
 
173
 
174
  const getRankIcon = (index) => {
175
  switch(index) {
176
+ case 0: return React.createElement('span', { style: { fontSize: '24px' } }, 'πŸ†');
177
+ case 1: return React.createElement('span', { style: { fontSize: '24px' } }, 'πŸ₯ˆ');
178
+ case 2: return React.createElement('span', { style: { fontSize: '24px' } }, 'πŸ₯‰');
179
+ default: return React.createElement('span', {
180
+ style: { fontSize: '20px', fontWeight: 'bold', color: '#9ca3af' }
181
+ }, `#${index + 1}`);
182
  }
183
  };
184
 
 
204
  };
205
 
206
  const getSortIcon = (column) => {
207
+ if (sortBy !== column) {
208
+ return React.createElement('span', { style: { color: '#9ca3af' } }, '↕️');
209
+ }
210
  return sortOrder === 'desc' ?
211
+ React.createElement('span', { style: { color: '#3b82f6' } }, '⬇️') :
212
+ React.createElement('span', { style: { color: '#3b82f6' } }, '⬆️');
213
+ };
214
+
215
+ const styles = {
216
+ container: {
217
+ minHeight: '100vh',
218
+ background: 'linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #3730a3 100%)',
219
+ padding: '32px 16px'
220
+ },
221
+ innerContainer: {
222
+ maxWidth: '1200px',
223
+ margin: '0 auto'
224
+ },
225
+ header: {
226
+ textAlign: 'center',
227
+ marginBottom: '32px'
228
+ },
229
+ title: {
230
+ fontSize: '48px',
231
+ fontWeight: 'bold',
232
+ color: 'white',
233
+ marginBottom: '16px',
234
+ background: 'linear-gradient(to right, #60a5fa, #a78bfa)',
235
+ WebkitBackgroundClip: 'text',
236
+ backgroundClip: 'text',
237
+ color: 'transparent'
238
+ },
239
+ subtitle: {
240
+ fontSize: '20px',
241
+ color: '#d1d5db',
242
+ marginBottom: '24px'
243
+ },
244
+ statsContainer: {
245
+ display: 'flex',
246
+ justifyContent: 'center',
247
+ gap: '32px',
248
+ textAlign: 'center',
249
+ flexWrap: 'wrap'
250
+ },
251
+ statCard: {
252
+ background: 'rgba(255, 255, 255, 0.1)',
253
+ backdropFilter: 'blur(10px)',
254
+ border: '1px solid rgba(255, 255, 255, 0.2)',
255
+ borderRadius: '12px',
256
+ padding: '16px'
257
+ },
258
+ statNumber: {
259
+ fontSize: '24px',
260
+ fontWeight: 'bold',
261
+ color: 'white'
262
+ },
263
+ statLabel: {
264
+ fontSize: '14px',
265
+ color: '#d1d5db'
266
+ },
267
+ controlsContainer: {
268
+ marginBottom: '24px',
269
+ display: 'flex',
270
+ flexWrap: 'wrap',
271
+ gap: '16px',
272
+ alignItems: 'center',
273
+ justifyContent: 'space-between'
274
+ },
275
+ inputGroup: {
276
+ display: 'flex',
277
+ flexWrap: 'wrap',
278
+ gap: '16px',
279
+ alignItems: 'center'
280
+ },
281
+ inputContainer: {
282
+ position: 'relative'
283
+ },
284
+ inputIcon: {
285
+ position: 'absolute',
286
+ left: '12px',
287
+ top: '50%',
288
+ transform: 'translateY(-50%)',
289
+ color: '#9ca3af'
290
+ },
291
+ input: {
292
+ background: 'rgba(255, 255, 255, 0.1)',
293
+ backdropFilter: 'blur(10px)',
294
+ border: '1px solid rgba(255, 255, 255, 0.2)',
295
+ borderRadius: '8px',
296
+ color: 'white',
297
+ padding: '8px 12px 8px 40px',
298
+ outline: 'none',
299
+ fontSize: '14px'
300
+ },
301
+ select: {
302
+ background: 'rgba(255, 255, 255, 0.1)',
303
+ backdropFilter: 'blur(10px)',
304
+ border: '1px solid rgba(255, 255, 255, 0.2)',
305
+ borderRadius: '8px',
306
+ color: 'white',
307
+ padding: '8px 32px 8px 40px',
308
+ outline: 'none',
309
+ fontSize: '14px'
310
+ },
311
+ updateButton: {
312
+ background: '#059669',
313
+ color: 'white',
314
+ border: 'none',
315
+ borderRadius: '8px',
316
+ padding: '8px 16px',
317
+ cursor: 'pointer',
318
+ display: 'flex',
319
+ alignItems: 'center',
320
+ gap: '8px',
321
+ fontSize: '14px'
322
+ },
323
+ tableCard: {
324
+ background: 'rgba(255, 255, 255, 0.1)',
325
+ backdropFilter: 'blur(10px)',
326
+ border: '1px solid rgba(255, 255, 255, 0.2)',
327
+ borderRadius: '12px',
328
+ overflow: 'hidden'
329
+ },
330
+ tableContainer: {
331
+ overflowX: 'auto'
332
+ },
333
+ scrollContainer: {
334
+ maxHeight: '384px',
335
+ overflowY: 'auto'
336
+ },
337
+ table: {
338
+ width: '100%',
339
+ borderCollapse: 'collapse'
340
+ },
341
+ tableHeader: {
342
+ position: 'sticky',
343
+ top: 0,
344
+ background: 'rgba(255, 255, 255, 0.1)',
345
+ backdropFilter: 'blur(10px)',
346
+ borderBottom: '1px solid rgba(255, 255, 255, 0.1)'
347
+ },
348
+ th: {
349
+ padding: '16px 24px',
350
+ textAlign: 'left',
351
+ color: 'white',
352
+ fontWeight: '600'
353
+ },
354
+ thClickable: {
355
+ padding: '16px 24px',
356
+ textAlign: 'left',
357
+ color: 'white',
358
+ fontWeight: '600',
359
+ cursor: 'pointer'
360
+ },
361
+ tr: {
362
+ borderBottom: '1px solid rgba(255, 255, 255, 0.05)'
363
+ },
364
+ td: {
365
+ padding: '16px 24px'
366
+ },
367
+ progressBar: {
368
+ width: '100%',
369
+ background: '#374151',
370
+ borderRadius: '4px',
371
+ height: '8px'
372
+ },
373
+ progressFill: {
374
+ background: 'linear-gradient(to right, #3b82f6, #8b5cf6)',
375
+ height: '8px',
376
+ borderRadius: '4px',
377
+ transition: 'width 0.5s ease'
378
+ },
379
+ badge: {
380
+ padding: '4px 8px',
381
+ borderRadius: '12px',
382
+ fontSize: '12px',
383
+ fontWeight: '500'
384
+ },
385
+ badgeBlue: {
386
+ background: 'rgba(59, 130, 246, 0.2)',
387
+ color: '#93c5fd'
388
+ },
389
+ badgeGreen: {
390
+ background: 'rgba(34, 197, 94, 0.2)',
391
+ color: '#86efac'
392
+ },
393
+ badgePurple: {
394
+ background: 'rgba(147, 51, 234, 0.2)',
395
+ color: '#c4b5fd'
396
+ },
397
+ infoSection: {
398
+ marginTop: '32px',
399
+ display: 'flex',
400
+ flexDirection: 'column',
401
+ gap: '24px'
402
+ },
403
+ infoCard: {
404
+ background: 'rgba(255, 255, 255, 0.1)',
405
+ backdropFilter: 'blur(10px)',
406
+ border: '1px solid rgba(255, 255, 255, 0.2)',
407
+ borderRadius: '12px',
408
+ padding: '24px'
409
+ },
410
+ academicCard: {
411
+ background: 'rgba(255, 255, 255, 0.1)',
412
+ backdropFilter: 'blur(10px)',
413
+ border: '1px solid rgba(255, 255, 255, 0.2)',
414
+ borderRadius: '12px',
415
+ padding: '16px',
416
+ textAlign: 'center'
417
+ },
418
+ loadingContainer: {
419
+ minHeight: '100vh',
420
+ background: 'linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #3730a3 100%)',
421
+ display: 'flex',
422
+ alignItems: 'center',
423
+ justifyContent: 'center'
424
+ },
425
+ spinner: {
426
+ width: '64px',
427
+ height: '64px',
428
+ border: '2px solid transparent',
429
+ borderBottom: '2px solid white',
430
+ borderRadius: '50%',
431
+ animation: 'spin 1s linear infinite',
432
+ margin: '0 auto 16px'
433
+ }
434
  };
435
 
436
  if (loading) {
437
+ return React.createElement('div', { style: styles.loadingContainer },
438
+ React.createElement('div', { style: { textAlign: 'center' } },
439
+ React.createElement('div', { style: styles.spinner }),
440
+ React.createElement('p', { style: { color: 'white', fontSize: '20px' } }, 'Loading leaderboard...')
441
+ )
 
 
442
  );
443
  }
444
 
445
+ return React.createElement('div', null,
446
+ React.createElement('style', null, `
447
+ @keyframes spin {
448
+ 0% { transform: rotate(0deg); }
449
+ 100% { transform: rotate(360deg); }
450
+ }
451
+ .rotate {
452
+ animation: spin 1s linear infinite;
453
+ }
454
+ .hover-row:hover {
455
+ background: rgba(255, 255, 255, 0.05);
456
+ }
457
+ input::placeholder {
458
+ color: #9ca3af;
459
+ }
460
+ select option {
461
+ background: #1f2937;
462
+ color: white;
463
+ }
464
+ `),
465
+ React.createElement('div', { style: styles.container },
466
+ React.createElement('div', { style: styles.innerContainer },
467
+ React.createElement('div', { style: styles.header },
468
+ React.createElement('h1', { style: styles.title }, 'πŸ† Urology AI Leaderboard'),
469
+ React.createElement('p', { style: styles.subtitle }, 'Evaluating Natural Language Models on Urology Knowledge Assessment'),
470
+ React.createElement('div', { style: styles.statsContainer },
471
+ React.createElement('div', { style: styles.statCard },
472
+ React.createElement('div', { style: styles.statNumber }, data.length),
473
+ React.createElement('div', { style: styles.statLabel }, 'Models')
474
+ ),
475
+ React.createElement('div', { style: styles.statCard },
476
+ React.createElement('div', { style: styles.statNumber }, '151'),
477
+ React.createElement('div', { style: styles.statLabel }, 'Questions')
478
+ ),
479
+ React.createElement('div', { style: styles.statCard },
480
+ React.createElement('div', { style: styles.statNumber }, 'SAS Urology'),
481
+ React.createElement('div', { style: styles.statLabel }, 'Specialty')
482
+ )
483
+ )
484
+ ),
485
+ React.createElement('div', { style: styles.controlsContainer },
486
+ React.createElement('div', { style: styles.inputGroup },
487
+ React.createElement('div', { style: styles.inputContainer },
488
+ React.createElement('span', { style: styles.inputIcon }, 'πŸ”'),
489
+ React.createElement('input', {
490
+ type: 'text',
491
+ placeholder: 'Search model...',
492
+ value: searchTerm,
493
+ onChange: (e) => setSearchTerm(e.target.value),
494
+ style: styles.input
495
+ })
496
+ ),
497
+ React.createElement('div', { style: styles.inputContainer },
498
+ React.createElement('span', { style: styles.inputIcon }, 'πŸ“‹'),
499
+ React.createElement('select', {
500
+ value: filterLicense,
501
+ onChange: (e) => setFilterLicense(e.target.value),
502
+ style: styles.select
503
+ },
504
+ React.createElement('option', { value: 'all' }, 'All licenses'),
505
+ React.createElement('option', { value: 'API Service' }, 'API Service'),
506
+ React.createElement('option', { value: 'Apache 2.0' }, 'Apache 2.0'),
507
+ React.createElement('option', { value: 'MIT' }, 'MIT')
508
+ )
509
+ )
510
+ ),
511
+ React.createElement('button', {
512
+ onClick: refreshData,
513
+ disabled: refreshing,
514
+ style: { ...styles.updateButton, opacity: refreshing ? 0.5 : 1 }
515
+ },
516
+ React.createElement('span', { className: refreshing ? 'rotate' : '' }, 'πŸ”„'),
517
+ React.createElement('span', null, refreshing ? 'Updating...' : 'Update')
518
+ )
519
+ ),
520
+ React.createElement('div', { style: styles.tableCard },
521
+ React.createElement('div', { style: styles.tableContainer },
522
+ React.createElement('div', { style: styles.scrollContainer },
523
+ React.createElement('table', { style: styles.table },
524
+ React.createElement('thead', { style: styles.tableHeader },
525
+ React.createElement('tr', null,
526
+ React.createElement('th', { style: styles.th }, 'Rank'),
527
+ React.createElement('th', { style: styles.th }, 'Model'),
528
+ React.createElement('th', {
529
+ style: styles.thClickable,
530
+ onClick: () => {
531
  if (sortBy === 'accuracy') {
532
  setSortOrder(sortOrder === 'desc' ? 'asc' : 'desc');
533
  } else {
534
  setSortBy('accuracy');
535
  setSortOrder('desc');
536
  }
537
+ }
538
+ },
539
+ React.createElement('div', { style: { display: 'flex', alignItems: 'center', gap: '4px' } },
540
+ React.createElement('span', null, '🎯'),
541
+ React.createElement('span', null, 'Accuracy'),
542
+ getSortIcon('accuracy')
543
+ )
544
+ ),
545
+ React.createElement('th', { style: styles.th }, 'Answers'),
546
+ React.createElement('th', { style: styles.th }, 'Parameters'),
547
+ React.createElement('th', { style: styles.th }, 'License'),
548
+ React.createElement('th', {
549
+ style: styles.thClickable,
550
+ onClick: () => {
551
  if (sortBy === 'submittedTime') {
552
  setSortOrder(sortOrder === 'desc' ? 'asc' : 'desc');
553
  } else {
554
  setSortBy('submittedTime');
555
  setSortOrder('desc');
556
  }
557
+ }
558
+ },
559
+ React.createElement('div', { style: { display: 'flex', alignItems: 'center', gap: '4px' } },
560
+ React.createElement('span', null, 'πŸ•’'),
561
+ React.createElement('span', null, 'Date'),
562
+ getSortIcon('submittedTime')
563
+ )
564
+ )
565
+ )
566
+ ),
567
+ React.createElement('tbody', null,
568
+ filteredAndSortedData.map((item, index) =>
569
+ React.createElement('tr', {
570
+ key: item.model,
571
+ style: styles.tr,
572
+ className: 'hover-row'
573
+ },
574
+ React.createElement('td', { style: styles.td }, getRankIcon(index)),
575
+ React.createElement('td', { style: styles.td },
576
+ React.createElement('div', { style: { display: 'flex', flexDirection: 'column' } },
577
+ React.createElement('div', { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
578
+ React.createElement('span', { style: { color: 'white', fontWeight: '500' } }, item.model.split('/').pop()),
579
+ React.createElement('span', { style: { color: '#9ca3af', cursor: 'pointer' } }, 'πŸ”—')
580
+ ),
581
+ React.createElement('span', { style: { fontSize: '14px', color: '#9ca3af' } }, item.model.split('/')[0])
582
+ )
583
+ ),
584
+ React.createElement('td', { style: styles.td },
585
+ React.createElement('div', { style: { display: 'flex', alignItems: 'center', gap: '12px' } },
586
+ React.createElement('div', { style: { flex: 1 } },
587
+ React.createElement('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '4px' } },
588
+ React.createElement('span', { style: { color: 'white', fontWeight: '600' } }, formatAccuracy(item.accuracy))
589
+ ),
590
+ React.createElement('div', { style: styles.progressBar },
591
+ React.createElement('div', {
592
+ style: { ...styles.progressFill, width: `${item.accuracy * 100}%` }
593
+ })
594
+ )
595
+ )
596
+ )
597
+ ),
598
+ React.createElement('td', { style: styles.td },
599
+ React.createElement('div', { style: { textAlign: 'center' } },
600
+ React.createElement('div', { style: { color: 'white', fontWeight: '600' } }, `${item.correctAnswers}/${item.totalQuestions}`),
601
+ React.createElement('div', { style: { fontSize: '14px', color: '#9ca3af' } }, 'correct')
602
+ )
603
+ ),
604
+ React.createElement('td', { style: styles.td },
605
+ React.createElement('div', { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
606
+ React.createElement('span', null, '⚑'),
607
+ React.createElement('span', { style: { color: 'white' } }, formatParams(item.params))
608
+ )
609
+ ),
610
+ React.createElement('td', { style: styles.td },
611
+ React.createElement('span', {
612
+ style: {
613
+ ...styles.badge,
614
+ ...(item.license === 'API Service' ? styles.badgeBlue :
615
+ item.license === 'Apache 2.0' ? styles.badgeGreen : styles.badgePurple)
616
+ }
617
+ }, item.license)
618
+ ),
619
+ React.createElement('td', { style: styles.td },
620
+ React.createElement('div', { style: { fontSize: '14px', color: '#d1d5db' } }, formatDate(item.submittedTime))
621
+ )
622
+ )
623
+ )
624
+ )
625
+ )
626
+ )
627
+ )
628
+ ),
629
+ React.createElement('div', { style: styles.infoSection },
630
+ React.createElement('div', { style: styles.infoCard },
631
+ React.createElement('h3', { style: { fontSize: '20px', fontWeight: '600', color: 'white', marginBottom: '12px' } }, 'πŸ“Š About This Evaluation'),
632
+ React.createElement('p', { style: { color: '#d1d5db', marginBottom: '12px' } }, 'This leaderboard evaluates natural language models on their ability to answer urology questions. Models must respond to multiple-choice questions about urological knowledge, demonstrating their understanding and mastery of this medical specialty.'),
633
+ React.createElement('p', { style: { color: '#d1d5db', marginBottom: '16px' } }, 'Questions are from the SAS (Servicio Andaluz de Salud) for the ', React.createElement('strong', null, 'Convocatoria Concurso OposiciΓ³n'), ' - specialized medical examination for urology residents.'),
634
+ React.createElement('div', { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap: '8px', color: '#d1d5db' } },
635
+ React.createElement('span', null, 'Dataset: ', React.createElement('a', { href: 'https://huggingface.co/datasets/SASLeaderboard/results', style: { color: '#60a5fa', textDecoration: 'none' } }, 'SASLeaderboard/results')),
636
+ lastUpdated && React.createElement('span', { style: { fontSize: '14px' } }, `Last updated: ${lastUpdated.toLocaleString('en-US')}`)
637
+ )
638
+ ),
639
+ React.createElement('div', { style: styles.academicCard },
640
+ React.createElement('h4', { style: { fontSize: '18px', fontWeight: '600', color: 'white', marginBottom: '8px' } }, 'πŸŽ“ Academic Project'),
641
+ React.createElement('p', { style: { color: '#d1d5db', fontSize: '14px' } },
642
+ 'Final project for IES Rafael Alberti', React.createElement('br'),
643
+ 'Course: Artificial Intelligence and Big Data', React.createElement('br'),
644
+ 'Subject: Artificial Intelligence Models'
645
+ )
646
+ )
647
+ )
648
+ )
649
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  );
651
  };
652