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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions docs/code_samples/v2_classification.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?php

use Mindee\Input\PathInput;
use Mindee\V2\Client;
use Mindee\V2\Product\Classification\Params\ClassificationParameters;
use Mindee\V2\Product\Classification\ClassificationResponse;
use Mindee\Input\PathInput;

$apiKey = "MY_API_KEY";
$filePath = "/path/to/the/file.ext";
$modelId = "MY_MODEL_ID";
$filePath = "/path/to/the/file.ext";

// Init a new client
$mindeeClient = new Client($apiKey);

// Set classification parameters
// Note: modelId is mandatory.
$classificationParams = new ClassificationParameters(
$modelParams = new ClassificationParameters(
// ID of the model, required.
$modelId,
);
Expand All @@ -26,7 +25,7 @@ $inputSource = new PathInput($filePath);
$response = $mindeeClient->enqueueAndGetResult(
ClassificationResponse::class,
$inputSource,
$classificationParams
$modelParams
);

// Print a summary of the response
Expand Down
9 changes: 4 additions & 5 deletions docs/code_samples/v2_crop.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?php

use Mindee\Input\PathInput;
use Mindee\V2\Client;
use Mindee\V2\Product\Crop\Params\CropParameters;
use Mindee\V2\Product\Crop\CropResponse;
use Mindee\Input\PathInput;

$apiKey = "MY_API_KEY";
$filePath = "/path/to/the/file.ext";
$modelId = "MY_MODEL_ID";
$filePath = "/path/to/the/file.ext";

// Init a new client
$mindeeClient = new Client($apiKey);

// Set crop parameters
// Note: modelId is mandatory.
$cropParams = new CropParameters(
$modelParams = new CropParameters(
// ID of the model, required.
$modelId,
);
Expand All @@ -26,7 +25,7 @@ $inputSource = new PathInput($filePath);
$response = $mindeeClient->enqueueAndGetResult(
CropResponse::class,
$inputSource,
$cropParams
$modelParams
);

// Print a summary of the response
Expand Down
9 changes: 4 additions & 5 deletions docs/code_samples/v2_extraction_polling.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?php

use Mindee\Input\PathInput;
use Mindee\V2\Client;
use Mindee\V2\Product\Extraction\Params\ExtractionParameters;
use Mindee\Input\PathInput;
use Mindee\V2\Product\Extraction\ExtractionResponse;

$apiKey = "MY_API_KEY";
$filePath = "/path/to/the/file.ext";
$modelId = "MY_MODEL_ID";
$filePath = "/path/to/the/file.ext";

// Init a new client
$mindeeClient = new Client($apiKey);

// Set inference parameters
// Note: modelId is mandatory.
$inferenceParams = new ExtractionParameters(
$modelParams = new ExtractionParameters(
// ID of the model, required.
$modelId,

Expand All @@ -38,7 +37,7 @@ $inputSource = new PathInput($filePath);
$response = $mindeeClient->enqueueAndGetResult(
ExtractionResponse::class,
$inputSource,
$inferenceParams
$modelParams
);

// Print a summary of the response
Expand Down
9 changes: 4 additions & 5 deletions docs/code_samples/v2_extraction_webhook.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<?php

use Mindee\Input\PathInput;
use Mindee\V2\Client;
use Mindee\V2\Product\Extraction\Params\ExtractionParameters;
use Mindee\Input\PathInput;

$apiKey = "MY_API_KEY";
$filePath = "/path/to/the/file.ext";
$modelId = "MY_MODEL_ID";
$filePath = "/path/to/the/file.ext";

// Init a new client
$mindeeClient = new Client($apiKey);

// Set inference parameters
// Note: modelId is mandatory.
$inferenceParams = new ExtractionParameters(
$modelParams = new ExtractionParameters(
// ID of the model, required.
$modelId,
webhookIds: ["MY_WEBHOOK_ID"],
Expand All @@ -37,7 +36,7 @@ $inputSource = new PathInput($filePath);
// Send for processing
$response = $mindeeClient->enqueue(
$inputSource,
$inferenceParams
$modelParams
);

// Print the job ID
Expand Down
9 changes: 4 additions & 5 deletions docs/code_samples/v2_ocr.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?php

use Mindee\Input\PathInput;
use Mindee\V2\Client;
use Mindee\V2\Product\Ocr\Params\OcrParameters;
use Mindee\V2\Product\Ocr\OcrResponse;
use Mindee\Input\PathInput;

$apiKey = "MY_API_KEY";
$filePath = "/path/to/the/file.ext";
$modelId = "MY_MODEL_ID";
$filePath = "/path/to/the/file.ext";

// Init a new client
$mindeeClient = new Client($apiKey);

// Set ocr parameters
// Note: modelId is mandatory.
$ocrParams = new OcrParameters(
$modelParams = new OcrParameters(
// ID of the model, required.
$modelId,
);
Expand All @@ -26,7 +25,7 @@ $inputSource = new PathInput($filePath);
$response = $mindeeClient->enqueueAndGetResult(
OcrResponse::class,
$inputSource,
$ocrParams
$modelParams
);

// Print a summary of the response
Expand Down
9 changes: 4 additions & 5 deletions docs/code_samples/v2_split.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?php

use Mindee\Input\PathInput;
use Mindee\V2\Client;
use Mindee\V2\Product\Split\Params\SplitParameters;
use Mindee\V2\Product\Split\SplitResponse;
use Mindee\Input\PathInput;

$apiKey = "MY_API_KEY";
$filePath = "/path/to/the/file.ext";
$modelId = "MY_MODEL_ID";
$filePath = "/path/to/the/file.ext";

// Init a new client
$mindeeClient = new Client($apiKey);

// Set split parameters
// Note: modelId is mandatory.
$splitParams = new SplitParameters(
$modelParams = new SplitParameters(
// ID of the model, required.
$modelId,
);
Expand All @@ -26,7 +25,7 @@ $inputSource = new PathInput($filePath);
$response = $mindeeClient->enqueueAndGetResult(
SplitResponse::class,
$inputSource,
$splitParams
$modelParams
);

// Print a summary of the response
Expand Down
Loading