jeffhaines commited on
Commit
ab0c546
·
1 Parent(s): 556df27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -25,5 +25,7 @@ if text:
25
  attributions = cls_explainer(text)
26
  df = pd.DataFrame(attributions[1:-1])
27
  df.rename(columns = {0: 'Token', 1: 'Contribution'}, inplace = True)
28
- st.write(df.style.hide(axis = 'index'))
29
- st.write(cls_explainer.visualize())
 
 
 
25
  attributions = cls_explainer(text)
26
  df = pd.DataFrame(attributions[1:-1])
27
  df.rename(columns = {0: 'Token', 1: 'Contribution'}, inplace = True)
28
+ st.sidebar.write('This table shows how each word contributes to the model\'s judgment. Positive scores indicate that the word contributed toward the judgment while negative scores show how much the word pushed the model in the other direction.')
29
+ st.sidebar.write(df.style.hide(axis = 'index'))
30
+ st.write(cls_explainer.visualize())
31
+ st.write('Note that the model is trained on a dataset of ethical judgments that are meant to represent the intuitive judgments of Americans and as such might conflict with what you believe, the judgments of people in other cultures, or what might in fact be right.')