Second issue I am having . I can train my model using the Forms Recogniser Studio but when I want to train my model in C# code using the label files I have made with Forms Recogniser Studio none of the training files are recognised .
Here is the code I am using
{
static async Task Main(string[] args)
{
try
{
// Get configuration settings
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
IConfigurationRoot configuration = builder.Build();
string formEndpoint = configuration["FormEndpoint"];
string formKey = configuration["FormKey"];
string trainingStorageUri = configuration["StorageUri"];
// Authenticate Form Training Client
var credential = new AzureKeyCredential(formKey);
var trainingClient = new FormTrainingClient(new Uri(formEndpoint), credential);
// Train model
CustomFormModel model = await trainingClient
.StartTrainingAsync(new Uri(trainingStorageUri), useTrainingLabels: true)
.WaitForCompletionAsync();
// Get model info
Console.WriteLine($"Custom Model Info:");
Console.WriteLine($" Model Id: {model.ModelId}");
//Console.WriteLine($" Model Id: {model.ModelName}");
Console.WriteLine($" Model Status: {model.Status}");
Console.WriteLine($" Training model started on: {model.TrainingStartedOn}");
Console.WriteLine($" Training model completed on: {model.TrainingCompletedOn}");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
And the exception being thrown is :
Invalid model created with ID 7ff1fb0f-ba2c-41cb-b7c1-fe2aaf03cccb
Status: 200 (OK)
ErrorCode: 2102
Additional Information:
error-0: 2102: Only 0 valid input document(s) were found. Please provide at least 5 input documents. Generic error during processing of OCR results for BT-App V1.0-chrisg4.pdf Generic error during processing of OCR results for BT-App V1.0-chrisg2.pdf Generic error during processing of OCR results for BT-App V1.0-chrisg5.pdf Generic error during processing of OCR results for BT-App V1.0-chrisg3.pdf Generic error during processing of OCR results for BT-App V1.0-chrisg1.pdf
These are the same documents I have used to successful train my model with the Forms Recogniser Studio and made the label files with.