machineuser commited on
Commit
3dc3992
·
1 Parent(s): da081e4

Sync widgets demo

Browse files
packages/tasks/src/library-ui-elements.ts CHANGED
@@ -541,6 +541,13 @@ transcriptions = asr_model.transcribe(["file.wav"])`,
541
 
542
  const mlAgents = (model: ModelData) => [`mlagents-load-from-hf --repo-id="${model.id}" --local-dir="./downloads"`];
543
 
 
 
 
 
 
 
 
544
  const nemo = (model: ModelData) => {
545
  let command: string[] | undefined = undefined;
546
  // Resolve the tag to a nemo domain/sub-domain
@@ -621,6 +628,12 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
621
  docsUrl: "https://huggingface.co/docs/hub/keras",
622
  snippets: keras,
623
  },
 
 
 
 
 
 
624
  nemo: {
625
  btnLabel: "NeMo",
626
  repoName: "NeMo",
 
541
 
542
  const mlAgents = (model: ModelData) => [`mlagents-load-from-hf --repo-id="${model.id}" --local-dir="./downloads"`];
543
 
544
+ const mlx = (model: ModelData) => [
545
+ `pip install huggingface_hub hf_transfer
546
+
547
+ export HF_HUB_ENABLE_HF_TRANSFER=1
548
+ huggingface-cli download --local-dir ${nameWithoutNamespace(model.id)} ${model.id}`,
549
+ ];
550
+
551
  const nemo = (model: ModelData) => {
552
  let command: string[] | undefined = undefined;
553
  // Resolve the tag to a nemo domain/sub-domain
 
628
  docsUrl: "https://huggingface.co/docs/hub/keras",
629
  snippets: keras,
630
  },
631
+ mlx: {
632
+ btnLabel: "MLX",
633
+ repoName: "MLX",
634
+ repoUrl: "https://github.com/ml-explore/mlx-examples/tree/main",
635
+ snippets: mlx,
636
+ },
637
  nemo: {
638
  btnLabel: "NeMo",
639
  repoName: "NeMo",
packages/tasks/src/model-libraries.ts CHANGED
@@ -16,6 +16,7 @@ export enum ModelLibrary {
16
  "flair" = "Flair",
17
  "keras" = "Keras",
18
  "k2" = "K2",
 
19
  "nemo" = "NeMo",
20
  "open_clip" = "OpenCLIP",
21
  "paddlenlp" = "PaddleNLP",
 
16
  "flair" = "Flair",
17
  "keras" = "Keras",
18
  "k2" = "K2",
19
+ "mlx" = "mlx",
20
  "nemo" = "NeMo",
21
  "open_clip" = "OpenCLIP",
22
  "paddlenlp" = "PaddleNLP",