Allow pull data from python all the way through to the UI
This commit is contained in:
@@ -21,6 +21,11 @@
|
||||
<div class="main-area">
|
||||
<button @onclick="pullandtrain">@button1Text</button>
|
||||
<button @onclick="predict">@button2Text</button>
|
||||
|
||||
@foreach(double cur in predictions){
|
||||
<p>@cur</p><br/>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -29,6 +34,8 @@
|
||||
string button1Text = "Train AI";
|
||||
string button2Text = "Predict AI";
|
||||
|
||||
double[] predictions = {};
|
||||
|
||||
async Task pullandtrain(){
|
||||
button1Text = "Do not refresh the page. The data is refreshing.";
|
||||
await Task.Delay(1);
|
||||
@@ -37,10 +44,10 @@
|
||||
}
|
||||
|
||||
async Task predict(){
|
||||
button1Text = "Do not refresh the page. The data is refreshing.";
|
||||
button2Text = "Do not refresh the page. The data is refreshing.";
|
||||
await Task.Delay(1);
|
||||
aiModule.TrainAI();
|
||||
button1Text = "Refresh Completed";
|
||||
predictions = aiModule.PredictAI();
|
||||
button2Text = "Refresh Completed";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user