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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -178,6 +178,7 @@ def main():
178
  explainer = TextExplainer(sampler=MaskingTextSampler())
179
  explainer.fit(st.session_state["text"], model.predict_proba)
180
  html = eli5.format_as_html(explainer.explain_prediction(target_names=["Human", "AI"]))
 
181
  else:
182
  with st.spinner('Wait for it 💭... BERT-based model explanations take around 4-10 minutes. In case you want to abort, refresh the page.'):
183
  # TORCH EXPLAINER PRED FUNC (USES logits)
 
178
  explainer = TextExplainer(sampler=MaskingTextSampler())
179
  explainer.fit(st.session_state["text"], model.predict_proba)
180
  html = eli5.format_as_html(explainer.explain_prediction(target_names=["Human", "AI"]))
181
+ st.markdown('<span style="color:green"><strong>Green:</strong> Contributes to decision | </span><span style="color:red"><strong>Red:</strong> Opposite</span>', unsafe_allow_html=True)
182
  else:
183
  with st.spinner('Wait for it 💭... BERT-based model explanations take around 4-10 minutes. In case you want to abort, refresh the page.'):
184
  # TORCH EXPLAINER PRED FUNC (USES logits)