document.head.appendChild(imported);
imported.onload = function(){
// Once the script has loaded tf should be available
// the rest of your program would need to be in this function
var aTensor = tf.tensor1d([1,2,3]);
};
// Start the loading process
However it might be easier to make an html page with a script tag that loads the library and then another script tag for your code. This will all work without a server, though it can be useful in the long run to have a local server to get data into your application.