mishig HF Staff commited on
Commit
d914174
·
1 Parent(s): 28a9a23

Sort models lexiographically

Browse files
src/lib/components/Playground/Playground.svelte CHANGED
@@ -51,6 +51,7 @@
51
  // TODO: use hfjs.hub listModels after https://github.com/huggingface/huggingface.js/pull/795
52
  const res = await fetch("https://huggingface.co/api/models?pipeline_tag=text-generation&inferenceStatus=loaded&filter=conversational");
53
  compatibleModels = await res.json() as ModelEntry[];
 
54
  })();
55
  })
56
 
 
51
  // TODO: use hfjs.hub listModels after https://github.com/huggingface/huggingface.js/pull/795
52
  const res = await fetch("https://huggingface.co/api/models?pipeline_tag=text-generation&inferenceStatus=loaded&filter=conversational");
53
  compatibleModels = await res.json() as ModelEntry[];
54
+ compatibleModels.sort((a, b) => a.id.toLowerCase().localeCompare(b.id.toLowerCase()));
55
  })();
56
  })
57