davanstrien HF Staff commited on
Commit
6121f46
·
verified ·
1 Parent(s): f71f605

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +53 -0
index.html CHANGED
@@ -5,6 +5,7 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>SQL Console Demos</title>
7
  <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap" rel="stylesheet" />
 
8
  <style>
9
  body {
10
  font-family: 'Source Sans Pro', system-ui, -apple-system, sans-serif;
@@ -25,6 +26,22 @@
25
  color: #111827;
26
  }
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  .grid {
29
  display: flex;
30
  flex-direction: column;
@@ -74,6 +91,10 @@
74
  <header class="header">
75
  <h1>Leaderboards</h1>
76
  </header>
 
 
 
 
77
 
78
  <div class="grid">
79
  <div class="card">
@@ -99,5 +120,37 @@
99
  </div>
100
  </div>
101
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  </body>
103
  </html>
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>SQL Console Demos</title>
7
  <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap" rel="stylesheet" />
8
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/duckdb/0.10.1/duckdb.min.js"></script>
9
  <style>
10
  body {
11
  font-family: 'Source Sans Pro', system-ui, -apple-system, sans-serif;
 
26
  color: #111827;
27
  }
28
 
29
+ .summary {
30
+ text-align: center;
31
+ margin-bottom: 2rem;
32
+ padding: 1rem;
33
+ background: white;
34
+ border-radius: 12px;
35
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1);
36
+ border: 1px solid #e5e7eb;
37
+ }
38
+
39
+ .summary p {
40
+ font-size: 1.1rem;
41
+ color: #374151;
42
+ margin: 0;
43
+ }
44
+
45
  .grid {
46
  display: flex;
47
  flex-direction: column;
 
91
  <header class="header">
92
  <h1>Leaderboards</h1>
93
  </header>
94
+
95
+ <div class="summary" id="total-annotations">
96
+ <p>Loading total annotations...</p>
97
+ </div>
98
 
99
  <div class="grid">
100
  <div class="card">
 
120
  </div>
121
  </div>
122
  </div>
123
+
124
+ <script>
125
+ async function initDuckDB() {
126
+ const JSDELIVR_BUNDLES = "https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm/dist";
127
+ const DUCKDB_BUNDLES = {
128
+ mvp: {
129
+ mainModule: JSDELIVR_BUNDLES + "/duckdb-mvp.wasm",
130
+ mainWorker: JSDELIVR_BUNDLES + "/duckdb-browser-mvp.worker.js",
131
+ },
132
+ };
133
+
134
+ const db = await duckdb.createWorker(DUCKDB_BUNDLES);
135
+
136
+ try {
137
+ const result = await db.query(`
138
+ SELECT SUM(submitted) as total_annotations
139
+ FROM 'hf://datasets/davanstrien/progress@~parquet/train/*.parquet'
140
+ `);
141
+
142
+ const totalAnnotations = result[0].total_annotations;
143
+ document.getElementById('total-annotations').innerHTML =
144
+ `<p>Total annotations submitted: <strong>${totalAnnotations.toLocaleString()}</strong></p>`;
145
+
146
+ } catch (error) {
147
+ console.error('Error:', error);
148
+ document.getElementById('total-annotations').innerHTML =
149
+ '<p>Error loading total annotations</p>';
150
+ }
151
+ }
152
+
153
+ initDuckDB();
154
+ </script>
155
  </body>
156
  </html>