dimanche 29 septembre 2019

Python Shell script not called in Symfony

I am using Ubuntu 18.04 and I have implemented openFace library which works fine through terminal that takes two input parameter containing name of images

Terminal command

python /home/machine/openface/demos/compare_two_pic.py {/home/machine/openface/demos/images/5G5X0dnI5xkD.jpg,/home/machine/openface/demos/images/orange.jpg}

I just pasted this command in Symfony but i didn't get any result.

$process = new Process(['python2', '/home/machine/openface/demos/compare_two_pic.py {/home/machine/openface/demos/images/5G5X0dnI5xkD.jpg,/home/machine/openface/demos/images/orange.jpg}',$arg(optional)]);

        $process->run();
echo "here".$process->getOutput();

// executes after the command finishes
        if (!$process->isSuccessful()) {
            throw new ProcessFailedException($process);
        }

        echo $process->getOutput();

I make a web service to just call a function and check. Is this function working or not? The output of function



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire