const tokenizerPath = chrome.runtime.getURL('tokenizer.json');

async function main() {
  // Load tokenizer dictionary
  const tokenizerResponse = await fetch(tokenizerPath);
  const tokenizerObj = await tokenizerResponse.json();
  const tokenizer = new Map(Object.entries(tokenizerObj));

  console.log(tokenizer.entries());
  console.log(tokenizer.get('bread'));
}

main();

@@ -1,20 +1,83 @@
+const mlModelPath = chrome.runtime.getURL('model/model.json');%0A
 const tokenizerPath 
@@ -183,26 +183,17 @@
   const 
-tokenizerR
+r
 esponse 
@@ -255,18 +255,9 @@
 ait 
-tokenizerR
+r
 espo
@@ -382,29 +382,165 @@
 log(
-tokenizer.get('bread'
+%60Tokenizer dict size: $%7Btokenizer.size%7D%60);%0A%0A  // Attempt to load ML model%0A  const model = await tf.loadLayersModel(mlModelPath);%0A  console.log(model.summary(
 ));%0A

Add ML model loading in Chrome extension