;
            };

            request.onsuccess = (event) => {
                const result = event.target.result;
                if (result) {
                    resolve(result);
                } else {
                    resolve(null);
                }
            };

            request.onerror = (event) => {
                console.error('Tensor retrieve failed: ', event.target.error);
                resolve(null);
            };
        });
    }

    window.addEventListener('load', async functio