Spaces:
Runtime error
Runtime error
Increase model threshold and conservativeness
Browse files36 unmodified lines3738394040414236 unmodified linesdef predict_from_document(sentences): preprop = preprocess(sentences) prediction = model.predict(preprop) # Set the prediction threshold to 0.8 output = (prediction.flatten()[: len(sentences)] >= 0.5).astype(int) output = (prediction.flatten()[: len(sentences)] >= 0.8).astype(int) return output, prediction.flatten()[: len(sentences)]functions/model_infer.py+2-1