File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
3+ use Mindee\Input\PathInput;
34use Mindee\V2\Client;
45use Mindee\V2\Product\Classification\Params\ClassificationParameters;
56use Mindee\V2\Product\Classification\ClassificationResponse;
6- use Mindee\Input\PathInput;
77
88$apiKey = "MY_API_KEY";
9- $filePath = "/path/to/the/file.ext";
109$modelId = "MY_MODEL_ID";
10+ $filePath = "/path/to/the/file.ext";
1111
1212// Init a new client
1313$mindeeClient = new Client($apiKey);
1414
1515// Set classification parameters
16- // Note: modelId is mandatory.
17- $classificationParams = new ClassificationParameters(
16+ $modelParams = new ClassificationParameters(
1817 // ID of the model, required.
1918 $modelId,
2019);
@@ -26,7 +25,7 @@ $inputSource = new PathInput($filePath);
2625$response = $mindeeClient->enqueueAndGetResult(
2726 ClassificationResponse::class,
2827 $inputSource,
29- $classificationParams
28+ $modelParams
3029);
3130
3231// Print a summary of the response
Original file line number Diff line number Diff line change 11<?php
22
3+ use Mindee\Input\PathInput;
34use Mindee\V2\Client;
45use Mindee\V2\Product\Crop\Params\CropParameters;
56use Mindee\V2\Product\Crop\CropResponse;
6- use Mindee\Input\PathInput;
77
88$apiKey = "MY_API_KEY";
9- $filePath = "/path/to/the/file.ext";
109$modelId = "MY_MODEL_ID";
10+ $filePath = "/path/to/the/file.ext";
1111
1212// Init a new client
1313$mindeeClient = new Client($apiKey);
1414
1515// Set crop parameters
16- // Note: modelId is mandatory.
17- $cropParams = new CropParameters(
16+ $modelParams = new CropParameters(
1817 // ID of the model, required.
1918 $modelId,
2019);
@@ -26,7 +25,7 @@ $inputSource = new PathInput($filePath);
2625$response = $mindeeClient->enqueueAndGetResult(
2726 CropResponse::class,
2827 $inputSource,
29- $cropParams
28+ $modelParams
3029);
3130
3231// Print a summary of the response
Original file line number Diff line number Diff line change 11<?php
22
3+ use Mindee\Input\PathInput;
34use Mindee\V2\Client;
45use Mindee\V2\Product\Extraction\Params\ExtractionParameters;
5- use Mindee\Input\PathInput;
66use Mindee\V2\Product\Extraction\ExtractionResponse;
77
88$apiKey = "MY_API_KEY";
9- $filePath = "/path/to/the/file.ext";
109$modelId = "MY_MODEL_ID";
10+ $filePath = "/path/to/the/file.ext";
1111
1212// Init a new client
1313$mindeeClient = new Client($apiKey);
1414
1515// Set inference parameters
16- // Note: modelId is mandatory.
17- $inferenceParams = new ExtractionParameters(
16+ $modelParams = new ExtractionParameters(
1817 // ID of the model, required.
1918 $modelId,
2019
@@ -38,7 +37,7 @@ $inputSource = new PathInput($filePath);
3837$response = $mindeeClient->enqueueAndGetResult(
3938 ExtractionResponse::class,
4039 $inputSource,
41- $inferenceParams
40+ $modelParams
4241);
4342
4443// Print a summary of the response
Original file line number Diff line number Diff line change 11<?php
22
3+ use Mindee\Input\PathInput;
34use Mindee\V2\Client;
45use Mindee\V2\Product\Extraction\Params\ExtractionParameters;
5- use Mindee\Input\PathInput;
66
77$apiKey = "MY_API_KEY";
8- $filePath = "/path/to/the/file.ext";
98$modelId = "MY_MODEL_ID";
9+ $filePath = "/path/to/the/file.ext";
1010
1111// Init a new client
1212$mindeeClient = new Client($apiKey);
1313
1414// Set inference parameters
15- // Note: modelId is mandatory.
16- $inferenceParams = new ExtractionParameters(
15+ $modelParams = new ExtractionParameters(
1716 // ID of the model, required.
1817 $modelId,
1918 webhookIds: ["MY_WEBHOOK_ID"],
@@ -37,7 +36,7 @@ $inputSource = new PathInput($filePath);
3736// Send for processing
3837$response = $mindeeClient->enqueue(
3938 $inputSource,
40- $inferenceParams
39+ $modelParams
4140);
4241
4342// Print the job ID
Original file line number Diff line number Diff line change 11<?php
22
3+ use Mindee\Input\PathInput;
34use Mindee\V2\Client;
45use Mindee\V2\Product\Ocr\Params\OcrParameters;
56use Mindee\V2\Product\Ocr\OcrResponse;
6- use Mindee\Input\PathInput;
77
88$apiKey = "MY_API_KEY";
9- $filePath = "/path/to/the/file.ext";
109$modelId = "MY_MODEL_ID";
10+ $filePath = "/path/to/the/file.ext";
1111
1212// Init a new client
1313$mindeeClient = new Client($apiKey);
1414
1515// Set ocr parameters
16- // Note: modelId is mandatory.
17- $ocrParams = new OcrParameters(
16+ $modelParams = new OcrParameters(
1817 // ID of the model, required.
1918 $modelId,
2019);
@@ -26,7 +25,7 @@ $inputSource = new PathInput($filePath);
2625$response = $mindeeClient->enqueueAndGetResult(
2726 OcrResponse::class,
2827 $inputSource,
29- $ocrParams
28+ $modelParams
3029);
3130
3231// Print a summary of the response
Original file line number Diff line number Diff line change 11<?php
22
3+ use Mindee\Input\PathInput;
34use Mindee\V2\Client;
45use Mindee\V2\Product\Split\Params\SplitParameters;
56use Mindee\V2\Product\Split\SplitResponse;
6- use Mindee\Input\PathInput;
77
88$apiKey = "MY_API_KEY";
9- $filePath = "/path/to/the/file.ext";
109$modelId = "MY_MODEL_ID";
10+ $filePath = "/path/to/the/file.ext";
1111
1212// Init a new client
1313$mindeeClient = new Client($apiKey);
1414
1515// Set split parameters
16- // Note: modelId is mandatory.
17- $splitParams = new SplitParameters(
16+ $modelParams = new SplitParameters(
1817 // ID of the model, required.
1918 $modelId,
2019);
@@ -26,7 +25,7 @@ $inputSource = new PathInput($filePath);
2625$response = $mindeeClient->enqueueAndGetResult(
2726 SplitResponse::class,
2827 $inputSource,
29- $splitParams
28+ $modelParams
3029);
3130
3231// Print a summary of the response
You can’t perform that action at this time.
0 commit comments