Jesse-marqo commited on
Commit
f81f0ae
1 Parent(s): bb0221e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +21 -17
index.html CHANGED
@@ -2,12 +2,13 @@
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>CSV Table</title>
7
  <style>
8
  table {
9
  border-collapse: collapse;
10
  width: 100%;
 
11
  }
12
  th, td {
13
  border: 1px solid #dddddd;
@@ -24,25 +25,28 @@
24
  <table id="csv-table">
25
  <!-- CSV data will be inserted here -->
26
  </table>
27
- <script>
28
- // CSV data
29
- var csvData = 'merged-averaged-model_timings_2.1.0_12.1_NVIDIA_A10G_False';
30
 
31
- // Parse CSV data
32
- var rows = csvData.trim().split('\n');
33
- var table = document.getElementById('csv-table');
 
 
 
 
 
34
 
35
- // Insert data into table
36
- rows.forEach(function(row) {
37
- var cells = row.split(',');
38
- var tr = document.createElement('tr');
39
- cells.forEach(function(cell) {
40
- var td = document.createElement('td');
41
- td.textContent = cell;
42
- tr.appendChild(td);
 
 
 
43
  });
44
- table.appendChild(tr);
45
- });
46
  </script>
47
  </body>
48
  </html>
 
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
  <title>CSV Table</title>
7
  <style>
8
  table {
9
  border-collapse: collapse;
10
  width: 100%;
11
+ margin-top: 20px;
12
  }
13
  th, td {
14
  border: 1px solid #dddddd;
 
25
  <table id="csv-table">
26
  <!-- CSV data will be inserted here -->
27
  </table>
 
 
 
28
 
29
+ <script>
30
+ // Fetch CSV data
31
+ fetch('merged-averaged-model_timings_2.1.0_12.1_NVIDIA_A10G_False.csv')
32
+ .then(response => response.text())
33
+ .then(csvData => {
34
+ // Parse CSV data
35
+ var rows = csvData.trim().split('\n');
36
+ var table = document.getElementById('csv-table');
37
 
38
+ // Insert data into table
39
+ rows.forEach(function(row) {
40
+ var cells = row.split(',');
41
+ var tr = document.createElement('tr');
42
+ cells.forEach(function(cell) {
43
+ var td = document.createElement('td');
44
+ td.textContent = cell.trim();
45
+ tr.appendChild(td);
46
+ });
47
+ table.appendChild(tr);
48
+ });
49
  });
 
 
50
  </script>
51
  </body>
52
  </html>