Exemple #1
0
 public TrainingHostedService(
     ILogger <TrainingHostedService> logger,
     IHostApplicationLifetime appLifetime,
     TrainingOptions trainingOptions)
 {
     _logger         = logger;
     _appLifetime    = appLifetime;
     _trainingClient = CreateClient(trainingOptions);
 }
Exemple #2
0
        private static CustomVisionTrainingClient CreateClient(TrainingOptions options)
        {
            var trainingApi = new CustomVisionTrainingClient
            {
                ApiKey   = options.AzureVision.ApiKey,
                Endpoint = options.AzureVision.Endpoint
            };

            return(trainingApi);
        }