IanRonk commited on
Commit
673264c
1 Parent(s): 9f6db74

Increase model threshold and conservativeness

Browse files
Files changed (1) hide show
  1. functions/model_infer.py +2 -1
functions/model_infer.py CHANGED
@@ -37,5 +37,6 @@ def preprocess(sentences):
37
  def predict_from_document(sentences):
38
  preprop = preprocess(sentences)
39
  prediction = model.predict(preprop)
40
- output = (prediction.flatten()[: len(sentences)] >= 0.5).astype(int)
 
41
  return output, prediction.flatten()[: len(sentences)]
 
37
  def predict_from_document(sentences):
38
  preprop = preprocess(sentences)
39
  prediction = model.predict(preprop)
40
+ # Set the prediction threshold to 0.8
41
+ output = (prediction.flatten()[: len(sentences)] >= 0.8).astype(int)
42
  return output, prediction.flatten()[: len(sentences)]