Update index.html
Browse files- index.html +52 -40
index.html
CHANGED
@@ -140,46 +140,58 @@
|
|
140 |
</section>
|
141 |
|
142 |
|
143 |
-
<
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
|
185 |
|
|
|
140 |
</section>
|
141 |
|
142 |
|
143 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/papaparse.min.js"></script>
|
144 |
+
|
145 |
+
<div id="table-container"></div>
|
146 |
+
|
147 |
+
<script>
|
148 |
+
const task = 'binary_classification';
|
149 |
+
const stage = 'preprocessing';
|
150 |
+
const csvUrl = `https://huggingface.co/datasets/holistic-ai/bias_mitigation_benchmark/resolve/main/benchmark_${task}_${stage}.csv`;
|
151 |
+
|
152 |
+
// Function to fetch and process the CSV data
|
153 |
+
fetch(csvUrl)
|
154 |
+
.then(response => response.text())
|
155 |
+
.then(csvData => {
|
156 |
+
Papa.parse(csvData, {
|
157 |
+
header: true,
|
158 |
+
complete: function(results) {
|
159 |
+
const data = results.data;
|
160 |
+
|
161 |
+
// Get the headers
|
162 |
+
const headers = results.meta.fields;
|
163 |
+
|
164 |
+
// Create table
|
165 |
+
const table = document.createElement('table');
|
166 |
+
table.border = '1';
|
167 |
+
|
168 |
+
// Create header row
|
169 |
+
const headerRow = document.createElement('tr');
|
170 |
+
headers.forEach(headerText => {
|
171 |
+
const th = document.createElement('th');
|
172 |
+
th.appendChild(document.createTextNode(headerText));
|
173 |
+
headerRow.appendChild(th);
|
174 |
+
});
|
175 |
+
table.appendChild(headerRow);
|
176 |
+
|
177 |
+
// Add data rows
|
178 |
+
data.forEach(rowData => {
|
179 |
+
const row = document.createElement('tr');
|
180 |
+
headers.forEach(header => {
|
181 |
+
const td = document.createElement('td');
|
182 |
+
td.appendChild(document.createTextNode(rowData[header]));
|
183 |
+
row.appendChild(td);
|
184 |
+
});
|
185 |
+
table.appendChild(row);
|
186 |
+
});
|
187 |
+
|
188 |
+
// Add table to the container
|
189 |
+
document.getElementById('table-container').appendChild(table);
|
190 |
+
}
|
191 |
+
});
|
192 |
+
})
|
193 |
+
.catch(error => console.error(error));
|
194 |
+
</script>
|
195 |
|
196 |
|
197 |
|