My plan is it to identify pictures of music instruments to say what kind of instrument it is. I do it with tensorflow based program "luminoth". It works! But now i try to execute the prediction via app. I wrote a script to upload a picture to a server with php file. Now i have a problem:
The script.sh is:
#!/bin/bash -l
lumi predict image1.jpg –checkpoint instruments -f /var/www/html/pictures/predictions/objects.json -d /var/www/html/pictures/predictions/
and when i make it executable (sudo chmod 777 script.sh) i can execute it via ./script.sh. Everything works and i get the predicted image.
But when try to execute it with this php file:
<?php
exec("./script.sh");
?>
Nothing happens.
But when i change the script.sh file to:
#!/bin/bash -l
mkdir hello
"hello" is created.
So to execute the second script.sh via php works! To execute the first one in shell works too! But to execute the first script.sh via php does not.
Do you have any ideas? Thanks a lot and have a good day!
set -x?sudo chmod 777 script.shdo way more than just making it executable.tensorflowortensorflow-gpupackages manually or via PyPI. " so I think the problem is, that, when execute in browse via php, luminoth is not able to find tensorflow. Du you have any ideas how to solve this problem? :-)