PeterPinetree commited on
Commit
ef0f6be
·
verified ·
1 Parent(s): aa67584

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +3 -2
index.html CHANGED
@@ -114,8 +114,8 @@
114
  status('Loading tokenizer…');
115
  try {
116
  if (modelId === 'local:gpt2') {
117
- // Requires you to upload /assets/gpt2/* files into the Space
118
- tokenizer = await tf.AutoTokenizer.from_pretrained('./assets/gpt2/');
119
  } else {
120
  tokenizer = await tf.AutoTokenizer.from_pretrained(modelId);
121
  }
@@ -127,6 +127,7 @@
127
  }
128
  }
129
 
 
130
  async function tokenize(){
131
  const myRun = ++runId;
132
  if (!tokenizer) {
 
114
  status('Loading tokenizer…');
115
  try {
116
  if (modelId === 'local:gpt2') {
117
+ // Note: no double slashes, no /resolve/main just your folder.
118
+ tokenizer = await tf.AutoTokenizer.from_pretrained('./assets/gpt2');
119
  } else {
120
  tokenizer = await tf.AutoTokenizer.from_pretrained(modelId);
121
  }
 
127
  }
128
  }
129
 
130
+
131
  async function tokenize(){
132
  const myRun = ++runId;
133
  if (!tokenizer) {