11import com.mindee.input.LocalInputSource;
22import com.mindee.v2.MindeeClient;
3- import com.mindee.v2.product.classification.ClassificationClassifier;
43import com.mindee.v2.product.classification.ClassificationResponse;
5- import com.mindee.v2.product.classification.ClassificationResult;
64import com.mindee.v2.product.classification.params.ClassificationParameters;
75import java.io.IOException;
86
@@ -16,17 +14,17 @@ public class SimpleMindeeClientV2 {
1614 String modelId = "MY_MODEL_ID";
1715
1816 // Init a new client
19- MindeeClient mindeeClient = new MindeeClient(apiKey);
17+ var mindeeClient = new MindeeClient(apiKey);
2018
2119 // Set inference parameters
2220 // Note: modelId is mandatory.
23- ClassificationParameters classificationParams = ClassificationParameters
21+ var classificationParams = ClassificationParameters
2422 // ID of the model, required.
2523 .builder(modelId)
2624 .build();
2725
2826 // Load a file from disk
29- LocalInputSource inputSource = new LocalInputSource(filePath);
27+ var inputSource = new LocalInputSource(filePath);
3028
3129 // Send for processing using polling
3230 ClassificationResponse response = mindeeClient.enqueueAndGetResult(
@@ -39,7 +37,7 @@ public class SimpleMindeeClientV2 {
3937 System.out.println(response.getInference().toString());
4038
4139 // Access the classification result
42- ClassificationResult result = response.getInference().getResult();
43- ClassificationClassifier classification = result.getClassification();
40+ var result = response.getInference().getResult();
41+ var classification = result.getClassification();
4442 }
4543}
0 commit comments