Пример #1
0
        public IActionResult Predict(SpamInput input)
        {
            var model = new SpamDetectionMLModel();

            model.Build();
            model.Train();
            ViewBag.Prediction = model.Predict(input);
            return(View());
        }
        public bool IsTrue(SpamInput input)
        {
            var model = new SpamDetectionMLModel();

            model.Build();
            model.Train();
            var result = model.Predict(input);

            return(Convert.ToBoolean(result.isSpam));
        }