aksell commited on
Commit
3f05b29
·
1 Parent(s): 53fcb4a

Remove leading underscore from ProtT5 token labels

Browse files
hexviz/pages/1_🗺️Identify_Interesting_Heads.py CHANGED
@@ -139,5 +139,9 @@ with right:
139
  unsafe_allow_html=True,
140
  )
141
 
 
 
 
 
142
  single_head_fig = plot_single_heatmap(attention, layer, head, tokens=tokens)
143
  st.pyplot(single_head_fig)
 
139
  unsafe_allow_html=True,
140
  )
141
 
142
+ if selected_model.name == ModelType.PROT_T5:
143
+ # Remove leading underscores from residue tokens
144
+ tokens = [token[1:] for token in tokens if str(token) != "</s>"]
145
+
146
  single_head_fig = plot_single_heatmap(attention, layer, head, tokens=tokens)
147
  st.pyplot(single_head_fig)