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)
25
25
26
26
# Print the document-level summary
27
27
# print(result.document.inference.prediction)
28
-
29
28
```
30
29
31
30
You can also call this product asynchronously:
@@ -47,7 +46,6 @@ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
47
46
48
47
# Print a brief summary of the parsed data
49
48
print (result.document)
50
-
51
49
```
52
50
53
51
** Output (RST):**
Original file line number Diff line number Diff line change @@ -25,7 +25,27 @@ print(result.document)
25
25
26
26
# Print the document-level summary
27
27
# 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
+ )
28
46
47
+ # Print a brief summary of the parsed data
48
+ print (result.document)
29
49
```
30
50
31
51
** Output (RST):**
You can’t perform that action at this time.
0 commit comments