public async Task <IActionResult> GetAllModels(IFormFile[] files)
        {
            try
            {
                var response = await _mlModelService.GetAllTrainedModelIds();

                return(Ok(response));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error getting trained model");
            }

            return(NoContent());
        }
        public async Task <AnalyzerResponse> RunFormRecognizerClient(IFormFile file, string modelId = "")
        {
            _logger.Information("Get list of trained models ...");
            var modelIds = await _mlModelService.GetAllTrainedModelIds();

            if (!modelIds.Any())
            {
                throw new InvalidOperationException("No trained model found. Can not analyzer document. Please train a model first");
            }

            _logger.Information("Analyze file...");

            var modelIdGuid = modelIds.First();

            if (!string.IsNullOrEmpty(modelId) && Guid.TryParse(modelId, out var guidResult) && modelIds.Contains(guidResult))
            {
                modelIdGuid = guidResult;
            }

            return(await AnalyzePdfForm(modelIdGuid, file));
        }