Merge branch 'main' into huggingface
Browse files- README.md +1 -1
- index.html +91 -13
README.md
CHANGED
@@ -11,7 +11,7 @@ short_description: Evaluating LLM performance across all human languages.
|
|
11 |
|
12 |
<!-- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference -->
|
13 |
|
14 |
-
#
|
15 |
|
16 |
Benchmarking all big AI models on all benchmarkable languages.
|
17 |
|
|
|
11 |
|
12 |
<!-- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference -->
|
13 |
|
14 |
+
# Local Language Monitor π
|
15 |
|
16 |
Benchmarking all big AI models on all benchmarkable languages.
|
17 |
|
index.html
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
<html>
|
3 |
|
4 |
<head>
|
5 |
-
<title>Language
|
|
|
6 |
<style>
|
7 |
body {
|
8 |
-
max-width: 1200px;
|
9 |
margin: 0 auto;
|
10 |
padding: 20px;
|
11 |
font-family: sans-serif;
|
@@ -27,17 +27,98 @@
|
|
27 |
</head>
|
28 |
|
29 |
<body>
|
30 |
-
<
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
<script type="module">
|
34 |
// Import Plot using ESM
|
35 |
import * as Plot from "https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6/+esm";
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
async function init() {
|
38 |
const scoreKey = "bleu"
|
39 |
const scoreName = "BLEU Score"
|
40 |
-
const
|
|
|
41 |
|
42 |
const response = await fetch('results.json');
|
43 |
const data = await response.json();
|
@@ -47,7 +128,7 @@
|
|
47 |
|
48 |
// Create summary plot
|
49 |
const summaryPlot = Plot.plot({
|
50 |
-
width:
|
51 |
height: 400,
|
52 |
marginBottom: 100,
|
53 |
x: { label: "Number of speakers", axis: null },
|
@@ -85,8 +166,8 @@
|
|
85 |
]
|
86 |
});
|
87 |
|
88 |
-
// Add summary plot
|
89 |
-
|
90 |
|
91 |
// Get unique languages with their speaker counts
|
92 |
const languageMap = new Map();
|
@@ -101,7 +182,6 @@
|
|
101 |
.sort((a, b) => b[1] - a[1])
|
102 |
.map(([lang]) => lang);
|
103 |
|
104 |
-
|
105 |
// Section for each language
|
106 |
languages.forEach(language => {
|
107 |
const headerDiv = document.createElement('div');
|
@@ -118,7 +198,7 @@
|
|
118 |
|
119 |
headerDiv.appendChild(h2);
|
120 |
headerDiv.appendChild(speakerP);
|
121 |
-
|
122 |
|
123 |
const languageData = data.filter(r => r.language_name === language)[0]["scores"];
|
124 |
|
@@ -144,10 +224,8 @@
|
|
144 |
})
|
145 |
]
|
146 |
});
|
147 |
-
|
148 |
}
|
149 |
-
|
150 |
-
|
151 |
});
|
152 |
}
|
153 |
|
|
|
2 |
<html>
|
3 |
|
4 |
<head>
|
5 |
+
<title>Local Language Monitor</title>
|
6 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
7 |
<style>
|
8 |
body {
|
|
|
9 |
margin: 0 auto;
|
10 |
padding: 20px;
|
11 |
font-family: sans-serif;
|
|
|
27 |
</head>
|
28 |
|
29 |
<body>
|
30 |
+
<nav class="border-b border-gray-200 bg-white">
|
31 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
32 |
+
<!-- Mobile menu button -->
|
33 |
+
<div class="sm:hidden absolute left-4 top-4">
|
34 |
+
<button onclick="toggleMobileMenu()" class="text-gray-500 hover:text-gray-700 focus:outline-none">
|
35 |
+
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
36 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
37 |
+
</svg>
|
38 |
+
</button>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<!-- Mobile menu (hidden by default) -->
|
42 |
+
<div id="mobileMenu" class="hidden sm:hidden absolute left-0 top-16 w-full bg-white border-b border-gray-200 py-2">
|
43 |
+
<div class="flex flex-col space-y-2 px-4">
|
44 |
+
<a href="#" onclick="showSection('coverage'); toggleMobileMenu()" class="nav-link block px-3 py-2 text-base font-medium text-gray-700">
|
45 |
+
Language Coverage
|
46 |
+
</a>
|
47 |
+
<a href="#" onclick="showSection('comparison'); toggleMobileMenu()" class="nav-link block px-3 py-2 text-base font-medium text-gray-700">
|
48 |
+
LLM Comparison
|
49 |
+
</a>
|
50 |
+
<a href="#" onclick="showSection('results'); toggleMobileMenu()" class="nav-link block px-3 py-2 text-base font-medium text-gray-700">
|
51 |
+
Results by Language
|
52 |
+
</a>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<!-- Desktop menu -->
|
57 |
+
<div class="hidden sm:flex justify-center h-16">
|
58 |
+
<div class="flex">
|
59 |
+
<div class="flex space-x-8">
|
60 |
+
<a href="#" onclick="showSection('coverage')" class="nav-link active inline-flex items-center px-1 pt-1 border-b-2 border-indigo-500 text-sm font-medium text-gray-900">
|
61 |
+
Language Coverage
|
62 |
+
</a>
|
63 |
+
<a href="#" onclick="showSection('comparison')" class="nav-link inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700">
|
64 |
+
LLM Comparison
|
65 |
+
</a>
|
66 |
+
<a href="#" onclick="showSection('results')" class="nav-link inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700">
|
67 |
+
Results by Language
|
68 |
+
</a>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</nav>
|
74 |
+
|
75 |
+
<div class="p-6">
|
76 |
+
<section id="coverage" class="section">
|
77 |
+
<div id="summary-chart"></div>
|
78 |
+
</section>
|
79 |
+
|
80 |
+
<section id="comparison" class="section hidden">
|
81 |
+
<p class="text-gray-600">Coming soon...</p>
|
82 |
+
</section>
|
83 |
+
|
84 |
+
<section id="results" class="section hidden">
|
85 |
+
<div id="language-list"></div>
|
86 |
+
</section>
|
87 |
+
</div>
|
88 |
|
89 |
<script type="module">
|
90 |
// Import Plot using ESM
|
91 |
import * as Plot from "https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6/+esm";
|
92 |
|
93 |
+
function showSection(sectionId) {
|
94 |
+
// Update nav links
|
95 |
+
document.querySelectorAll('.nav-link').forEach(link => {
|
96 |
+
link.classList.remove('border-indigo-500', 'text-gray-900');
|
97 |
+
link.classList.add('border-transparent', 'text-gray-500');
|
98 |
+
});
|
99 |
+
const activeLink = document.querySelector(`[onclick="showSection('${sectionId}')"]`);
|
100 |
+
activeLink.classList.remove('border-transparent', 'text-gray-500');
|
101 |
+
activeLink.classList.add('border-indigo-500', 'text-gray-900');
|
102 |
+
|
103 |
+
// Show/hide sections
|
104 |
+
document.querySelectorAll('.section').forEach(section => {
|
105 |
+
section.classList.add('hidden');
|
106 |
+
});
|
107 |
+
document.getElementById(sectionId).classList.remove('hidden');
|
108 |
+
}
|
109 |
+
window.showSection = showSection;
|
110 |
+
|
111 |
+
function toggleMobileMenu() {
|
112 |
+
const mobileMenu = document.getElementById('mobileMenu');
|
113 |
+
mobileMenu.classList.toggle('hidden');
|
114 |
+
}
|
115 |
+
window.toggleMobileMenu = toggleMobileMenu;
|
116 |
+
|
117 |
async function init() {
|
118 |
const scoreKey = "bleu"
|
119 |
const scoreName = "BLEU Score"
|
120 |
+
const summaryChartDiv = document.getElementById('summary-chart');
|
121 |
+
const languageListDiv = document.getElementById('language-list');
|
122 |
|
123 |
const response = await fetch('results.json');
|
124 |
const data = await response.json();
|
|
|
128 |
|
129 |
// Create summary plot
|
130 |
const summaryPlot = Plot.plot({
|
131 |
+
width: summaryChartDiv.clientWidth,
|
132 |
height: 400,
|
133 |
marginBottom: 100,
|
134 |
x: { label: "Number of speakers", axis: null },
|
|
|
166 |
]
|
167 |
});
|
168 |
|
169 |
+
// Add summary plot to the coverage section
|
170 |
+
summaryChartDiv.appendChild(summaryPlot);
|
171 |
|
172 |
// Get unique languages with their speaker counts
|
173 |
const languageMap = new Map();
|
|
|
182 |
.sort((a, b) => b[1] - a[1])
|
183 |
.map(([lang]) => lang);
|
184 |
|
|
|
185 |
// Section for each language
|
186 |
languages.forEach(language => {
|
187 |
const headerDiv = document.createElement('div');
|
|
|
198 |
|
199 |
headerDiv.appendChild(h2);
|
200 |
headerDiv.appendChild(speakerP);
|
201 |
+
languageListDiv.appendChild(headerDiv);
|
202 |
|
203 |
const languageData = data.filter(r => r.language_name === language)[0]["scores"];
|
204 |
|
|
|
224 |
})
|
225 |
]
|
226 |
});
|
227 |
+
languageListDiv.appendChild(plot);
|
228 |
}
|
|
|
|
|
229 |
});
|
230 |
}
|
231 |
|