PHP code example of hocvt / gradio-client-php

1. Go to this page and download the library: Download hocvt/gradio-client-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hocvt / gradio-client-php example snippets


use SergiX44\Gradio\Client;

$client = new Client('https://my-special.hf.space');

$result = $client->predict(['arg', 1, 2], apiName: 'myFunction');

bash
composer