-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add support for generated documents (#213)
- Loading branch information
Showing
37 changed files
with
1,359 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Mindee; | ||
using Mindee.Input; | ||
using Mindee.Http; | ||
using Mindee.Product.Generated; | ||
|
||
string apiKey = "my-api-key"; | ||
string filePath = "/path/to/the/file.ext"; | ||
|
||
// Construct a new client | ||
MindeeClient mindeeClient = new MindeeClient(apiKey); | ||
|
||
// Load an input source as a path string | ||
// Other input types can be used, as mentioned in the docs | ||
var inputSource = new LocalInputSource(filePath); | ||
|
||
// Set the endpoint configuration | ||
CustomEndpoint endpoint = new CustomEndpoint( | ||
endpointName: "my-endpoint", | ||
accountName: "my-account", | ||
version: "my-version" | ||
); | ||
|
||
// Call the product asynchronously with auto-polling | ||
var response = await mindeeClient | ||
.EnqueueAndParseAsync<GeneratedV1>(inputSource, endpoint); | ||
|
||
// Print a summary of all the predictions | ||
System.Console.WriteLine(response.Document.ToString()); | ||
|
||
// Print only the document-level predictions | ||
// System.Console.WriteLine(response.Document.Inference.Prediction.ToString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.