1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiModelTester.MainPage" BackgroundColor="Black">
<ScrollView x:Name="MainScrollView" Margin="10">
<Grid RowSpacing="10" ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0"
Text="ONNX Runtime Mobile Model Tester"
FontSize="Header"
TextColor="DeepSkyBlue"
HorizontalOptions="Center" />
<Grid Grid.Row="1" ColumnSpacing="10">
<!-- Run params. EP and iterations currently-->
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Text="Execution Provider"
TextColor="White" VerticalOptions="Center"/>
<Picker Grid.Row="0" Grid.Column="1" x:Name="ExecutionProviderOptions"
TextColor="White" Margin="5,5,5,5"/>
<Label Grid.Row="1" Grid.Column="0" Text="Iterations" TextColor="White" VerticalOptions="Center"/>
<Entry Grid.Row="1" Grid.Column="1" x:Name="Iterations" Text="10" TextColor="White"/>
</Grid>
<Button Grid.Row="2"
x:Name="RunButton" Text="Run"
FontSize="Large"
TextColor="White"
BackgroundColor="DeepSkyBlue"
SemanticProperties.Hint="Runs the model the requested number of times."
Clicked="OnRunClicked"
HorizontalOptions="Center" />
<Label Grid.Row="3" Text="Performance test results" TextColor="White" FontAttributes="Bold" />
<ActivityIndicator Grid.Row="4" x:Name="BusyIndicator" IsRunning="False" Color="Orange" />
<ScrollView Grid.Row="4" x:Name="TestResultsView" Margin="10">
<StackLayout x:Name="TestResults">
<Label Text="Results will be displayed after the model is run." TextColor="GhostWhite" />
</StackLayout>
</ScrollView>
</Grid>
</ScrollView>
</ContentPage>
|