Martijn van Beers
commited on
Commit
•
265622b
1
Parent(s):
7dff594
Remove legend from the visualization
Browse files- lib/util.py +4 -4
lib/util.py
CHANGED
@@ -28,14 +28,14 @@ class PyTMinMaxScalerVectorized(object):
|
|
28 |
return tensor
|
29 |
|
30 |
# copied out of captum because we need raw html instead of a jupyter widget
|
31 |
-
def visualize_text(datarecords, legend=
|
32 |
dom = ["<table width: 100%>"]
|
33 |
rows = [
|
34 |
# "<tr><th>True Label</th>"
|
35 |
-
"<th>Predicted Label</th>"
|
36 |
-
"<th>Attribution Label</th>"
|
37 |
# "<th>Attribution Score</th>"
|
38 |
-
"<th>Word Importance</th>"
|
39 |
]
|
40 |
for datarecord in datarecords:
|
41 |
rows.append(
|
|
|
28 |
return tensor
|
29 |
|
30 |
# copied out of captum because we need raw html instead of a jupyter widget
|
31 |
+
def visualize_text(datarecords, legend=False):
|
32 |
dom = ["<table width: 100%>"]
|
33 |
rows = [
|
34 |
# "<tr><th>True Label</th>"
|
35 |
+
"<th style='text-align: left'>Predicted Label</th>"
|
36 |
+
"<th style='text-align: left'>Attribution Label</th>"
|
37 |
# "<th>Attribution Score</th>"
|
38 |
+
"<th style='text-align: left'>Word Importance</th>"
|
39 |
]
|
40 |
for datarecord in datarecords:
|
41 |
rows.append(
|