Sample application which demonstrates the usage of FuncAI PHP.
This backend powers the API for the FuncAI PHP docs.
This is a Laravel application which provides API endpoint for different machine learning applications. The actual work is done via a queue, so that the server can handle many requests at once.
Run the following command in the root of this project:
docker build -t funcai-php-backend:latest -f docker/prod/Dockerfile .
docker run -p 80:80 -it -n funcai funcai-php-backend:latest
To install funcai-php we need the tensorflow library and the machine learning models. You can either download that data in the docker container:
docker exec -it funcai bash
php vendor/funcai/funcai-php/install.php
# Install the image stylization model (optional)
php vendor/funcai/funcai-php/install-stylization.php
# Install the image classification model (optional)
php vendor/funcai/funcai-php/install-imagenet21k.php
Alternatively you can mount the tensorflow and model folders into /var/www/html/tensorflow
and /var/www/html/models
.