Allow pull data from python all the way through to the UI

This commit is contained in:
2026-02-17 21:14:20 -08:00
parent 8d599be940
commit 26c995877e
3 changed files with 20 additions and 7 deletions
+10 -3
View File
@@ -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";
}
}