{
console.log(importFiles);
let reader = new FileReader();
reader.onload = async (event) => {
let savedModels = JSON.parse(event.target.result);
console.log(savedModels);
for (const model of savedModels) {
await addNewModel(localStorage.token, model).catch((error) => {
return null;
});
}
await models.set(await getModels(localStorage.token));
};
reader.readAsText(importFiles[0]);
}}
/>