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); }
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); }