Nymbo commited on
Commit
d7e4aec
·
verified ·
1 Parent(s): d6c1b24

Update src/routes/+page.server.ts

Browse files
Files changed (1) hide show
  1. src/routes/+page.server.ts +13 -3
src/routes/+page.server.ts CHANGED
@@ -17,9 +17,19 @@ export const load: PageServerLoad = async ({ fetch }) => {
17
  return { models: [] };
18
  }
19
  const compatibleModels: ModelEntry[] = await res.json();
20
- compatibleModels.sort((a, b) => a.id.toLowerCase().localeCompare(b.id.toLowerCase()));
21
 
22
- const promises = compatibleModels.map(async model => {
 
 
 
 
 
 
 
 
 
 
 
23
  const configUrl = `https://huggingface.co/${model.id}/raw/main/tokenizer_config.json`;
24
  const res = await fetch(configUrl, {
25
  headers: {
@@ -37,4 +47,4 @@ export const load: PageServerLoad = async ({ fetch }) => {
37
  const models: ModelEntryWithTokenizer[] = (await Promise.all(promises)).filter(model => model !== null);
38
 
39
  return { models };
40
- };
 
17
  return { models: [] };
18
  }
19
  const compatibleModels: ModelEntry[] = await res.json();
 
20
 
21
+ // Add specific models
22
+ const additionalModels: ModelEntry[] = [
23
+ {
24
+ id: "meta-llama/Meta-Llama-3.1-8B-Instruct",
25
+ // Add other required properties for ModelEntry
26
+ }
27
+ ];
28
+
29
+ const allModels = [...compatibleModels, ...additionalModels];
30
+ allModels.sort((a, b) => a.id.toLowerCase().localeCompare(b.id.toLowerCase()));
31
+
32
+ const promises = allModels.map(async model => {
33
  const configUrl = `https://huggingface.co/${model.id}/raw/main/tokenizer_config.json`;
34
  const res = await fetch(configUrl, {
35
  headers: {
 
47
  const models: ModelEntryWithTokenizer[] = (await Promise.all(promises)).filter(model => model !== null);
48
 
49
  return { models };
50
+ };