Answer the question
In order to leave comments, you need to log in
How to create and pass an object to OnPost?
Hello. I need to create a SentimentData object and pass it to OnPost.
<form method="post">
<div>
<label>Add Text</label>
<input asp-for=SentimentData.SentimentText class="form-control" />
<button type="submit" class="btn btn-primary">Save</button>
</div>
</form>
public void OnPost(SentimentData SentimentData)
{
Text = SentimentData.SentimentText;
Analysis.Evaluate(mlContext, Model, SplitDataView.TestSet);
Analysis.UseModelWithSingleItem(mlContext, SentimentData, Model, Text);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question