46 lines
983 B
Plaintext
46 lines
983 B
Plaintext
@page "/"
|
|
@rendermode InteractiveServer
|
|
|
|
<PageTitle>Home</PageTitle>
|
|
|
|
<div class="card-holder">
|
|
<a class="card">
|
|
HOME
|
|
</a>
|
|
<a class="card">
|
|
S&P Chart
|
|
</a>
|
|
<a class="card">
|
|
Connect
|
|
</a>
|
|
<a class="card">
|
|
About
|
|
</a>
|
|
</div>
|
|
|
|
<div class="main-area">
|
|
<button @onclick="pullandtrain">@button1Text</button>
|
|
<button @onclick="predict">@button2Text</button>
|
|
</div>
|
|
|
|
|
|
@code {
|
|
|
|
string button1Text = "Train AI";
|
|
string button2Text = "Predict AI";
|
|
|
|
async Task pullandtrain(){
|
|
button1Text = "Do not refresh the page. The data is refreshing.";
|
|
await Task.Delay(1);
|
|
aiModule.TrainAI();
|
|
button1Text = "Refresh Completed";
|
|
}
|
|
|
|
async Task predict(){
|
|
button1Text = "Do not refresh the page. The data is refreshing.";
|
|
await Task.Delay(1);
|
|
aiModule.TrainAI();
|
|
button1Text = "Refresh Completed";
|
|
}
|
|
|
|
} |