const mlModelPath = chrome.runtime.getURL('assets/model/model.json');
const tokenizerPath = chrome.runtime.getURL('assets/tokenizer.json');

/**
 * The entry point of the Chrome Extension.
 */
async function main() {
  // Load tokenizer dictionary
  const response = await fetch(tokenizerPath);
  const tokenizerObj = await response.json();
  const tokenizer = new Map(Object.entries(tokenizerObj));

  // Attempt to load ML model
  const model = await tf.loadLayersModel(mlModelPath);
}

main();

@@ -478,16 +478,342 @@
 elPath);
+%0A%0A  // Create calorie labeller object%0A  const labeller = new CalorieLabeller(tokenizer, model);%0A  %0A  console.log(labeller.label('pop tart'));%0A  console.log(labeller.label('water'));%0A  console.log(labeller.label('hamburger'));%0A  console.log(labeller.label('cheeseburger'));%0A  console.log(labeller.label('double cheeseburger'));
 %0A%7D%0A%0Amain

Test new CalorieLabeller class