private function predict(array $image, $modelType, $language = null)
    {
        $data['inputs'] = [
            [
                'data' => [
                    'image' => $image,
                ],
            ],
        ];

        if ($language) {
            $data['model'] = [
                'output_info' => [
                    'output_config' => [
                        'language' => $language,
                    ],
                ],
            ];
        }

        return $this->getRequest()->request(
            'POST',
            $this->getRequestUrl(sprintf('models/%s/outputs', $modelType)),
            $data
        );
    }
private function predict(array $image, $modelType, $language = null)
    {
        $data['inputs'] = [
            [
                'data' => [
                    'image' => $image,
                ],
            ],
        ];

        if ($language) {
            $data['model'] = [
                'output_info' => [
                    'output_config' => [
                        'language' => $language,
                    ],
                ],
            ];
        }

        return $this->getRequest()->request(
            'POST',
            $this->getRequestUrl(sprintf('models/%s/outputs', $modelType)),
            $data
        );
    }
private function predict ( array $ image , $ modelType , $ language = null ) { $ data [ 'inputs' ] = [ [ 'data' => [ 'image' => $ image , ] , ] , ] ; if ( $ language ) { $ data [ 'model' ] = [ 'output_info' => [ 'output_config' => [ 'language' => $ language , ] , ] , ] ; } return $ this -> getRequest ( ) -> request ( 'POST' , $ this -> getRequestUrl ( sprintf ( 'models/%s/outputs' , $ modelType ) ) , $ data ) ; }
The actual predict call

@param array $image
@param $modelType
@param string|null $language Language to return results in

@return array
The actual predict call