Пример #1
0
        public static async Task <string> Predict(CoreFxIssue issue)
        {
            if (_model == null)
            {
                _model = await PredictionModel.ReadAsync <CoreFxIssue, CoreFxIssuePrediction>(ModelPath);
            }

            var prediction = _model.Predict(issue);

            return(prediction.Area);
        }
Пример #2
0
        private async Task <string> GetLabel(Issue issue)
        {
            var corefxIssue = new CoreFxIssue
            {
                ID          = issue.Number.ToString(),
                Title       = issue.Title,
                Description = issue.Body
            };

            var predictedLabel = await Predictor.Predict(corefxIssue);

            return(predictedLabel);
        }