Having trouble uploading a CSV file from the assets folder in my Angular project using tf.data.csv. The code doesn't seem to recognize the file, resulting in an empty object being created. Can we even upload a CSV via tf.data.csv() from the assets? And if so, how can it be done? :)
async loadData(){
const csvUrl = 'assets/tfjs_model/lsm6dsm.csv' as string;
const csvDataset = tf.data.csv(csvUrl,
{
hasHeader:false,
columnNames:["timestamp", "x-axis","y-axis","z-axis"],
}
) as any;
console.log(csvDataset);
return csvDataset
}
Console Output:
base: e {size: null, input: e}
columnConfigs: undefined
columnNamesValidated: false
configuredColumnsOnly: undefined
delimWhitespace: false
delimiter: ","
fullColumnNames: (4) ["timestamp", "x-axis", "y-axis", "z-axis"]
hasHeader: false
input: e {url: "assets/tfjs_model/lsm6dsm.csv", fileOptions: {…}}
size: null
proto: t