This application trains a multiclass classification model to predict iris flower types and deploys the model alongside a Blazor WebAssembly static website.
For more details, see the accompanying blog post Deploy ML.NET Machine Learning Model in Blazor WebAssembly Static Website.
This project was built on a Windows PC but should work cross platform on Mac and Linux.
The solution three projects:
- SchemaLibrary: C# .NET Standard 2.0 class library that contains the schema definition classes of the data used to train the model as well as the prediction output generated by the model.
- TrainingConsole: C# .NET Core 3.1 console application used to train the machine learning model.
- BlazorWebApp: Blazor WebAssembly web application to make predictions using machine learning model trained by TrainingConsole application.
In the TrainConsole project directory, use the following command to run the application and train the model:
dotnet run
Note that CORS settings may have to be set up in Azure Storage to use localhost
In the BlazorWebApp project directory, use the following command to start the web application:
dotnet run