Creating a Dataset

Create a dataset to be used for training

Uploading Files to Hume

curl --location '<'>  
--header 'X-Hume-Api-Key: <YOUR API KEY>'  
--header 'Content-Type: application/json'  
--data '[  
    "file": {  
      "name": "<NAME OF FILE>",  
      "uri": "<URI OF FILE>",  
      "hume_storage": true,  
      "data_type": "image/png",  
      "metadata": {}  


        "file": {  
            "id": "9f045781-3ecd-4f34-ba9c-969139c32256",  
            "name": "<NAME OF FILE>",  
            "uri": "<URI OF FILE>,  
            "upload_uri": null,  
            "thumbnail_uri": null,  
            "user_id": "<YOUR USER ID>",  
            "data_type": "image/png",  
            "created_on": 1695851622,  
            "modified_on": 1695851622,  
            "metadata": {},  
            "hume_storage": true,  
            "hume_storage_upload_timestamp": null  
        "attributes": []  

Making your label file

We will create a CSV that has a column for the file_ids and another column for labels.
A file_id column and a labels column are required. The labels column can be named in the context relevant to you and your data. For us we'll call it expressions.
We will add a column for our readability named file_name.

Here is how our csv will look like.


Building the Dataset

Now that we have everything ready we can create our dataset

curl --location '<'>  
--header 'X-Hume-Api-Key:<YOUR API KEY>'  
--form 'name="Negative, Neutral, & Positive Facial Expressions"'  
--form 'labels_file=@"<Path TO LABEL FILE>/labelsFile.csv"'

Now we have created our dataset.

    "id": "8d6ddf39-d9ff-4f9c-9dbe-d6e288d8ddd7",  //Dataset ID
    "name": "Negative, Neutral, & Positive Facial Expressions",  
    "latest_version": {  
        "id": "d153f723-8a13-48d2-ba74-2a6c333ff0db",  //Dataset Version ID  
        "labels_file_uri": [URI to Labels File],  
        "dataset_id": "8d6ddf39-d9ff-4f9c-9dbe-d6e288d8ddd7",  
        "dataset_version": 0,  
        "created_on": 1695854279  
    "modified_on": 1695854279,  
    "metadata": null