mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Add csharp\sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Maui so we have an equivalent setup for MAUI as for the other platforms. This provides a setup to do some basic local testing of using an InferenceSession in a MAUI app.
18 lines
408 B
C#
18 lines
408 B
C#
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Maui;
|
|
|
|
public static class MauiProgram
|
|
{
|
|
public static MauiApp CreateMauiApp()
|
|
{
|
|
var builder = MauiApp.CreateBuilder();
|
|
builder
|
|
.UseMauiApp<App>()
|
|
.ConfigureFonts(fonts =>
|
|
{
|
|
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
|
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
|
|
});
|
|
|
|
return builder.Build();
|
|
}
|
|
}
|