Subi003 commited on
Commit
973d4eb
·
verified ·
1 Parent(s): 0644457

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. main/utils.py +2 -2
main/utils.py CHANGED
@@ -15,7 +15,7 @@ except:
15
  raise FileNotFoundError("Failed to load file having model metadata")
16
 
17
  # Intialize lime explainer with class names
18
- _global_explainer = LimeTextExplainer(class_names=["hate", "non-hate"])
19
 
20
  class LimeExplainer:
21
  def __init__(self):
@@ -53,7 +53,7 @@ class LimeExplainer:
53
  tweet,
54
  self._get_prediction_explaination,
55
  num_features=5,
56
- num_samples=50
57
  )
58
  return round_dict_values(dic = dict(explanation.as_list()))
59
 
 
15
  raise FileNotFoundError("Failed to load file having model metadata")
16
 
17
  # Intialize lime explainer with class names
18
+ _global_explainer = LimeTextExplainer(class_names=["hate", "non-hate"], bow=False)
19
 
20
  class LimeExplainer:
21
  def __init__(self):
 
53
  tweet,
54
  self._get_prediction_explaination,
55
  num_features=5,
56
+ num_samples=20
57
  )
58
  return round_dict_values(dic = dict(explanation.as_list()))
59