ferdmartin commited on
Commit
d8306ac
·
1 Parent(s): 97a6e64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -192,6 +192,7 @@ def main():
192
  explainer = shap.Explainer(f, tokenizer)
193
  shap_values = explainer([st.session_state["text"]], fixed_context=1)
194
  html = shap.plots.text(shap_values, display=False)
 
195
  # Render HTML
196
  st.components.v1.html(html, height=500, scrolling = True)
197
  else:
 
192
  explainer = shap.Explainer(f, tokenizer)
193
  shap_values = explainer([st.session_state["text"]], fixed_context=1)
194
  html = shap.plots.text(shap_values, display=False)
195
+ st.markdown('<span style="color:blue"><strong>Blue:</strong> Contributes to "human" | </span><span style="color:red"><strong>Red:</strong> Contributes to "AI"</span>', unsafe_allow_html=True)
196
  # Render HTML
197
  st.components.v1.html(html, height=500, scrolling = True)
198
  else: