Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,6 @@ dmypy.json
*.swp
*-swp
_test.py
_test*.py
_test.json
local_test
2 changes: 1 addition & 1 deletion docs/extras/code_samples/bank_account_details_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/bank_account_details_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/bank_check_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/barcode_reader_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/carte_grise_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/cropper_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/custom_v1.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/default_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, AsyncPredictResponse, product
from mindee.v1 import Client, AsyncPredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/expense_receipts_v5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/expense_receipts_v5_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, product, AsyncPredictResponse
from mindee.v1 import Client, product, AsyncPredictResponse

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/financial_document_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/financial_document_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, product, AsyncPredictResponse
from mindee.v1 import Client, product, AsyncPredictResponse

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/idcard_fr_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/idcard_fr_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/international_id_v2_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, product, AsyncPredictResponse
from mindee.v1 import Client, product, AsyncPredictResponse

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/invoice_splitter_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, product, AsyncPredictResponse
from mindee.v1 import Client, product, AsyncPredictResponse

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/invoices_v4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/invoices_v4_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, product, AsyncPredictResponse
from mindee.v1 import Client, product, AsyncPredictResponse

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/multi_receipts_detector_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/passport_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, PredictResponse, product
from mindee.v1 import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
12 changes: 6 additions & 6 deletions docs/extras/code_samples/v2_classification.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from mindee import (
ClientV2,
PathInput,
ClassificationParameters,
ClassificationResponse,
from mindee import PathInput
from mindee.v2 import (
Client,
ClassificationParameters,
ClassificationResponse,
)

input_path = "/path/to/the/file.ext"
api_key = "MY_API_KEY"
model_id = "MY_MODEL_ID"

# Init a new client
mindee_client = ClientV2(api_key)
mindee_client = Client(api_key)

# Set parameters
params = ClassificationParameters(
Expand Down
12 changes: 6 additions & 6 deletions docs/extras/code_samples/v2_crop.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from mindee import (
ClientV2,
PathInput,
CropParameters,
CropResponse,
from mindee import PathInput
from mindee.v2 import (
Client,
CropParameters,
CropResponse,
)

input_path = "/path/to/the/file.ext"
api_key = "MY_API_KEY"
model_id = "MY_MODEL_ID"

# Init a new client
mindee_client = ClientV2(api_key)
mindee_client = Client(api_key)

# Set parameters
params = CropParameters(
Expand Down
18 changes: 9 additions & 9 deletions docs/extras/code_samples/v2_extraction.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from mindee import (
ClientV2,
InferenceParameters,
InferenceResponse,
PathInput,
from mindee import PathInput
from mindee.v2 import (
Client,
ExtractionParameters,
ExtractionResponse,
)

input_path = "/path/to/the/file.ext"
api_key = "MY_API_KEY"
model_id = "MY_MODEL_ID"

# Init a new client
mindee_client = ClientV2(api_key)
mindee_client = Client(api_key)

# Set inference parameters
params = InferenceParameters(
# Set extraction parameters
params = ExtractionParameters(
# ID of the model, required.
model_id=model_id,

Expand All @@ -35,7 +35,7 @@ input_source = PathInput(input_path)

# Send for processing
response = mindee_client.enqueue_and_get_result(
InferenceResponse,
ExtractionResponse,
input_source,
params,
)
Expand Down
12 changes: 6 additions & 6 deletions docs/extras/code_samples/v2_ocr.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from mindee import (
ClientV2,
PathInput,
OCRParameters,
OCRResponse,
from mindee import PathInput
from mindee.v2 import (
Client,
OCRParameters,
OCRResponse,
)

input_path = "/path/to/the/file.ext"
api_key = "MY_API_KEY"
model_id = "MY_MODEL_ID"

# Init a new client
mindee_client = ClientV2(api_key)
mindee_client = Client(api_key)

# Set parameters
params = OCRParameters(
Expand Down
12 changes: 6 additions & 6 deletions docs/extras/code_samples/v2_split.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from mindee import (
ClientV2,
PathInput,
SplitParameters,
SplitResponse,
from mindee import PathInput
from mindee.v2 import (
Client,
SplitParameters,
SplitResponse,
)

input_path = "/path/to/the/file.ext"
api_key = "MY_API_KEY"
model_id = "MY_MODEL_ID"

# Init a new client
mindee_client = ClientV2(api_key)
mindee_client = Client(api_key)

# Set parameters
params = SplitParameters(
Expand Down
4 changes: 2 additions & 2 deletions docs/extras/code_samples/workflow_execution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# pip install mindee
#

from mindee import Client, WorkflowResponse
from mindee.parsing.common import ExecutionPriority
from mindee.v1 import Client, WorkflowResponse
from mindee.v1.parsing.common import ExecutionPriority

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/code_samples/workflow_ots_rag.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pip install mindee
#

from mindee import Client, product, AsyncPredictResponse
from mindee.v1 import Client, product, AsyncPredictResponse

# Init a new client
mindee_client = Client(api_key="my-api-key")
Expand Down
8 changes: 4 additions & 4 deletions examples/auto_invoice_splitter_extraction_example.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from mindee import Client
from mindee.v1.client import Client
from mindee.extraction.pdf_extractor import PdfExtractor
from mindee.input.sources.path_input import PathInput
from mindee.product.invoice.invoice_v4 import InvoiceV4
from mindee.product.invoice_splitter.invoice_splitter_v1 import InvoiceSplitterV1
from mindee.input.path_input import PathInput
from mindee.v1.product.invoice.invoice_v4 import InvoiceV4
from mindee.v1.product.invoice_splitter.invoice_splitter_v1 import InvoiceSplitterV1

mindee_client = Client(api_key="my-api-key")
# mindee_client = Client() # Optionally, set from env.
Expand Down
3 changes: 2 additions & 1 deletion examples/auto_multi_receipts_extraction_example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from mindee import Client, product
from mindee.v1.client import Client
from mindee.v1 import product
from mindee.extraction.multi_receipts_extractor.multi_receipts_extractor import (
extract_receipts,
)
Expand Down
5 changes: 3 additions & 2 deletions examples/custom_line_items_reconstruction.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os

from mindee import Client, product
from mindee.parsing.common.predict_response import PredictResponse
from mindee.v1.client import Client
from mindee.v1 import product
from mindee.v1.parsing.common import PredictResponse

CUSTOM_ENDPOINT_NAME = os.getenv("CUSTOM_ENDPOINT_NAME", "my-endpoint-name")
CUSTOM_ACCOUNT_NAME = os.getenv("CUSTOM_ACCOUNT_NAME", "my-account-name")
Expand Down
5 changes: 3 additions & 2 deletions examples/display_cropping.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
import cv2
import numpy as np

from mindee import Client, product
from mindee.parsing.common.predict_response import PredictResponse
from mindee.v1.client import Client
from mindee.v1 import product
from mindee.v1.parsing.common import PredictResponse


def relative_to_pixel_pos(polygon, image_h: int, image_w: int) -> List[Tuple[int, int]]:
Expand Down
Loading
Loading