File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed
Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1+ from mindee import Client, product, AsyncPredictResponse
2+
3+ # Init a new client
4+ mindee_client = Client(api_key="my-api-key")
5+
6+ # Load a file from disk
7+ input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
8+
9+ # Load a file from disk and enqueue it.
10+ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
11+ product.InvoiceV4,
12+ input_doc,
13+ )
14+
15+ # Print a brief summary of the parsed data
16+ print(result.document)
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ print(result.document)
2525
2626# Print the document-level summary
2727# print(result.document.inference.prediction)
28-
2928```
3029
3130You can also call this product asynchronously:
@@ -47,7 +46,6 @@ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
4746
4847# Print a brief summary of the parsed data
4948print (result.document)
50-
5149```
5250
5351** Output (RST):**
Original file line number Diff line number Diff line change @@ -25,7 +25,27 @@ print(result.document)
2525
2626# Print the document-level summary
2727# print(result.document.inference.prediction)
28+ ```
29+
30+ You can also call this product asynchronously:
31+
32+ ``` py
33+ from mindee import Client, product, AsyncPredictResponse
34+
35+ # Init a new client
36+ mindee_client = Client(api_key = " my-api-key" )
37+
38+ # Load a file from disk
39+ input_doc = mindee_client.source_from_path(" /path/to/the/file.ext" )
40+
41+ # Load a file from disk and enqueue it.
42+ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
43+ product.InvoiceV4,
44+ input_doc,
45+ )
2846
47+ # Print a brief summary of the parsed data
48+ print (result.document)
2949```
3050
3151** Output (RST):**
You can’t perform that action at this time.
0 commit comments