DemoFaceSwap.php 400 B

1234567891011121314
  1. <?php
  2. require('../../vendor/autoload.php');
  3. use Volc\Service\Visual;
  4. $client = Visual::getInstance();
  5. // call below method if you dont set ak and sk in ~/.volc/config
  6. $client->setAccessKey($ak);
  7. $client->setSecretKey($sk);
  8. echo "\nDemo FaceSwap\n";
  9. $response = $client->FaceSwap(['form_params' => [
  10. 'image_base64' => '', 'template_base64' => '', 'action_id' => 'faceswap']]);
  11. echo $response;