Detsutut commited on
Commit
9329025
1 Parent(s): 82abefe

Update explainer.py

Browse files
Files changed (1) hide show
  1. explainer.py +1 -2
explainer.py CHANGED
@@ -1,6 +1,5 @@
1
  from transformers_interpret import SequenceClassificationExplainer
2
  from captum.attr import visualization as viz
3
- import html
4
 
5
 
6
  class CustomExplainer(SequenceClassificationExplainer):
@@ -90,7 +89,7 @@ class CustomExplainer(SequenceClassificationExplainer):
90
  attention_html.append(
91
  f"<span class='word-box' style='background-color: {color};''>{word}</span><span>&nbsp;</span>")
92
 
93
- attention_html = html.unescape("".join(attention_html))
94
 
95
  final_html = f"""
96
  <!DOCTYPE html>
 
1
  from transformers_interpret import SequenceClassificationExplainer
2
  from captum.attr import visualization as viz
 
3
 
4
 
5
  class CustomExplainer(SequenceClassificationExplainer):
 
89
  attention_html.append(
90
  f"<span class='word-box' style='background-color: {color};''>{word}</span><span>&nbsp;</span>")
91
 
92
+ #attention_html = html.unescape("".join(attention_html))
93
 
94
  final_html = f"""
95
  <!DOCTYPE html>