hesamation commited on
Commit
403911f
·
1 Parent(s): d349c25

Update word-emb-hierarchy visualization: adjusted styles, added new models (DeepSeek, LLaMA, GPT-4), and modified layout dimensions.

Browse files
src/fragments/word-emb-hierarchy.html CHANGED
@@ -1,5 +1,5 @@
1
  <!-- The container for your D3 visualization -->
2
- <div id="my-word-emb-vis" style="height: 500px; width: 1000px;"></div>
3
 
4
  <!-- Include D3 (if Distill hasn't already) -->
5
  <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js"></script>
@@ -9,7 +9,7 @@
9
  /* Scope all rules to the container ID to avoid conflicts */
10
  #my-word-emb-vis .node circle {
11
  fill: #fff;
12
- stroke: #4682b4;
13
  stroke-width: 2px;
14
  transition: fill 0.3s, r 0.3s;
15
  cursor: pointer;
@@ -22,7 +22,7 @@
22
  }
23
  #my-word-emb-vis .link {
24
  fill: none;
25
- stroke: #ccc;
26
  stroke-width: 2px;
27
  transition: stroke 0.3s, stroke-width 0.3s;
28
  }
@@ -30,7 +30,7 @@
30
  font-weight: bold;
31
  }
32
  #my-word-emb-vis .node-highlighted circle {
33
- fill: #d1e7ff;
34
  r: 8;
35
  }
36
  #my-word-emb-vis .node-highlighted text {
@@ -39,7 +39,7 @@
39
  fill: #4682b4;
40
  }
41
  #my-word-emb-vis .link-highlighted {
42
- stroke: #4682b4;
43
  stroke-width: 3px;
44
  }
45
  </style>
@@ -71,14 +71,19 @@
71
  children: [
72
  { name: "ELMo" },
73
  { name: "GPT & GPT 2" },
74
- { name: "BERT" }
 
 
 
75
  ]
76
  }
77
  ]
78
  };
79
 
80
  // Dimensions
81
- const margin = { top: 10, right: 10, bottom: 10, left: 10 };
 
 
82
 
83
  // Create tree layout
84
  const treeLayout = d3.tree()
 
1
  <!-- The container for your D3 visualization -->
2
+ <div id="my-word-emb-vis"></div>
3
 
4
  <!-- Include D3 (if Distill hasn't already) -->
5
  <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js"></script>
 
9
  /* Scope all rules to the container ID to avoid conflicts */
10
  #my-word-emb-vis .node circle {
11
  fill: #fff;
12
+ stroke: #361E9A;
13
  stroke-width: 2px;
14
  transition: fill 0.3s, r 0.3s;
15
  cursor: pointer;
 
22
  }
23
  #my-word-emb-vis .link {
24
  fill: none;
25
+ stroke: #cb98af;
26
  stroke-width: 2px;
27
  transition: stroke 0.3s, stroke-width 0.3s;
28
  }
 
30
  font-weight: bold;
31
  }
32
  #my-word-emb-vis .node-highlighted circle {
33
+ fill: #361E9A;
34
  r: 8;
35
  }
36
  #my-word-emb-vis .node-highlighted text {
 
39
  fill: #4682b4;
40
  }
41
  #my-word-emb-vis .link-highlighted {
42
+ stroke: #ce6d99;
43
  stroke-width: 3px;
44
  }
45
  </style>
 
71
  children: [
72
  { name: "ELMo" },
73
  { name: "GPT & GPT 2" },
74
+ { name: "BERT" },
75
+ { name: "DeepSeek" },
76
+ { name: "LLaMA" },
77
+ { name: "GPT-4" }
78
  ]
79
  }
80
  ]
81
  };
82
 
83
  // Dimensions
84
+ const width = 800;
85
+ const height = 500;
86
+ const margin = { top: 20, right: 200, bottom: 20, left: 150 };
87
 
88
  // Create tree layout
89
  const treeLayout = d3.tree()