We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to send multiple images with just one api call, but the result is a empty json foreach image I sent.
The code that I am using is:
foreach ($imagBase64 as $key => $imgbase64) { $input[$key] = new DarrynTen\Clarifai\Entity\Input(); $input[$key]->setImage($imgbase64)->isEncoded()->setId($key); } $inputResult = $clarifai->getInputRepository()->add($input); $inputResult = $clarifai->getInputRepository()->get(); $results = json_decode(json_encode($inputResult)); var_dump($results);
If I send each image in an individual API Call using the following code I get the result:
foreach ($imagBase64 as $key => $imgbase64) { $modelResult[$key] = $clarifai->getModelRepository()->predictEncoded( $imgbase64, \DarrynTen\Clarifai\Repository\ModelRepository::GENERAL ); } foreach ($modelResult as $key => $result) { $image[$key] = json_decode(json_encode($result)); }
What I am doing wrong? I think maybe I need to set a ModelRepository, but I don't find a funtion to do this in documentation.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to send multiple images with just one api call, but the result is a empty json foreach image I sent.
The code that I am using is:
If I send each image in an individual API Call using the following code I get the result:
What I am doing wrong? I think maybe I need to set a ModelRepository, but I don't find a funtion to do this in documentation.
The text was updated successfully, but these errors were encountered: