Xrenya commited on
Commit
cfed90e
·
1 Parent(s): 587b307

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -195,7 +195,7 @@ def interpretation_function(file_obj):
195
  clean_text = text_preprocessing(text)
196
  clean_text = tokenizer.decode(tokenizer(clean_text)["input_ids"][:512])[6:]
197
  explainer = shap.Explainer(document_classifier)
198
- shap_values = explainer([clean_text])
199
 
200
  # Dimensions are (batch size, text size, number of classes)
201
  # Since we care about positive sentiment, use index 1
 
195
  clean_text = text_preprocessing(text)
196
  clean_text = tokenizer.decode(tokenizer(clean_text)["input_ids"][:512])[6:]
197
  explainer = shap.Explainer(document_classifier)
198
+ shap_values = explainer([clean_text[:-10]])
199
 
200
  # Dimensions are (batch size, text size, number of classes)
201
  # Since we care about positive sentiment, use index 1