Installation
Install the npm package:
npm i sensifai-sdk-ngx --save
Import module:
;
Sample Usage
The following example will set up the client and predict video or image attributes.
First of all, you need to import the library and define an instance as mentioned above.
You can get a free limited token
from Developer Panel by creating an application.
Then, if you want to process Data by URL you can call uploadByUrls
like the below sample code.
/** This Function Return a Json Result **/constructor private sdk : SensifaiSdkNgxService ;this.sdk.uploadByUrls urls_list, 'YOUR_APPLICATION_TOKEN', , ;
Also, if you want to process Data by File, you can call uploadByFiles
like the following sample code.
/** This Function Return a Json Result **/constructor private sdk : SensifaiSdkNgxService fileInputOnChange event
at the end, to retrieve the result of a task, pass it through getResultByTaskID
.
Please don't forget to pass a single TaskID!
this function won't work with a list of task id.
/** This Function Return a Json Result **/constructor private sdk : SensifaiSdkNgxService ;this.sdk.getResultByTaskID TaskID, , ;