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

            return(trainingApi);
        }