Spaces:
Runtime error
Runtime error
Make model more conservative
Browse files- functions/model_infer.py +1 -1
functions/model_infer.py
CHANGED
@@ -38,5 +38,5 @@ 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.
|
42 |
return output, prediction.flatten()[: len(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.85).astype(int)
|
42 |
return output, prediction.flatten()[: len(sentences)]
|