Skip to content

Commit

Permalink
bug-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GeeksSpan committed Jun 2, 2023
1 parent 10f3cfb commit 8af7003
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
18 changes: 12 additions & 6 deletions Olive.Aws.Comprehend/ComprehendClassifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,23 @@ public static async Task<string> StartClasifyingJob(string classifier_arn, strin
/// </summary>
public static async Task<string> StartClasifyingJob(string classifier_arn, string documetnKey, string outputfolder, string inputfolder, string bucketName)
{
if (IamRole == null)
{
throw new KeyNotFoundException("AWS:Comprehend:IAMRoleArn missing from your configuration");
}

var startJobRequest = new StartDocumentClassificationJobRequest()
{
DocumentClassifierArn = classifier_arn,
InputDataConfig = new InputDataConfig
{
S3Uri= $"s3://{bucketName}/{inputfolder}/{documetnKey}",
},
DocumentClassifierArn = classifier_arn,
InputDataConfig = new InputDataConfig
{
S3Uri = $"s3://{bucketName}/{inputfolder}/{documetnKey}",
},
OutputDataConfig = new OutputDataConfig
{
S3Uri = $"s3://{bucketName}/{outputfolder}/{documetnKey}",
},
},
DataAccessRoleArn = IamRole;
};
try
{
Expand Down
2 changes: 1 addition & 1 deletion Olive.Aws.Comprehend/Olive.Aws.Comprehend.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 8af7003

Please sign in to comment.