@huggingface/tasks 0.10.10 → 0.10.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +148 -9
- package/dist/index.js +147 -9
- package/dist/src/dataset-libraries.d.ts +57 -0
- package/dist/src/dataset-libraries.d.ts.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/local-apps.d.ts +22 -0
- package/dist/src/local-apps.d.ts.map +1 -1
- package/dist/src/model-libraries-snippets.d.ts +2 -0
- package/dist/src/model-libraries-snippets.d.ts.map +1 -1
- package/dist/src/model-libraries.d.ts +31 -2
- package/dist/src/model-libraries.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/dataset-libraries.ts +59 -0
- package/src/index.ts +3 -0
- package/src/local-apps.ts +47 -8
- package/src/model-libraries-snippets.ts +51 -0
- package/src/model-libraries.ts +19 -0
- package/src/tasks/automatic-speech-recognition/about.md +2 -2
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var src_exports = {};
|
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
ALL_DISPLAY_MODEL_LIBRARY_KEYS: () => ALL_DISPLAY_MODEL_LIBRARY_KEYS,
|
|
24
24
|
ALL_MODEL_LIBRARY_KEYS: () => ALL_MODEL_LIBRARY_KEYS,
|
|
25
|
+
DATASET_LIBRARIES_UI_ELEMENTS: () => DATASET_LIBRARIES_UI_ELEMENTS,
|
|
25
26
|
DEFAULT_MEMORY_OPTIONS: () => DEFAULT_MEMORY_OPTIONS,
|
|
26
27
|
InferenceDisplayability: () => InferenceDisplayability,
|
|
27
28
|
LIBRARY_TASK_MAPPING: () => LIBRARY_TASK_MAPPING,
|
|
@@ -4330,6 +4331,42 @@ var sklearn = (model) => {
|
|
|
4330
4331
|
return skopsJobLib(model);
|
|
4331
4332
|
}
|
|
4332
4333
|
};
|
|
4334
|
+
var stable_audio_tools = (model) => [
|
|
4335
|
+
`import torch
|
|
4336
|
+
import torchaudio
|
|
4337
|
+
from einops import rearrange
|
|
4338
|
+
from stable_audio_tools import get_pretrained_model
|
|
4339
|
+
from stable_audio_tools.inference.generation import generate_diffusion_cond
|
|
4340
|
+
|
|
4341
|
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
4342
|
+
|
|
4343
|
+
# Download model
|
|
4344
|
+
model, model_config = get_pretrained_model("${model.id}")
|
|
4345
|
+
sample_rate = model_config["sample_rate"]
|
|
4346
|
+
sample_size = model_config["sample_size"]
|
|
4347
|
+
|
|
4348
|
+
model = model.to(device)
|
|
4349
|
+
|
|
4350
|
+
# Set up text and timing conditioning
|
|
4351
|
+
conditioning = [{
|
|
4352
|
+
"prompt": "128 BPM tech house drum loop",
|
|
4353
|
+
}]
|
|
4354
|
+
|
|
4355
|
+
# Generate stereo audio
|
|
4356
|
+
output = generate_diffusion_cond(
|
|
4357
|
+
model,
|
|
4358
|
+
conditioning=conditioning,
|
|
4359
|
+
sample_size=sample_size,
|
|
4360
|
+
device=device
|
|
4361
|
+
)
|
|
4362
|
+
|
|
4363
|
+
# Rearrange audio batch to a single sequence
|
|
4364
|
+
output = rearrange(output, "b d n -> d (b n)")
|
|
4365
|
+
|
|
4366
|
+
# Peak normalize, clip, convert to int16, and save to file
|
|
4367
|
+
output = output.to(torch.float32).div(torch.max(torch.abs(output))).clamp(-1, 1).mul(32767).to(torch.int16).cpu()
|
|
4368
|
+
torchaudio.save("output.wav", output, sample_rate)`
|
|
4369
|
+
];
|
|
4333
4370
|
var fastai = (model) => [
|
|
4334
4371
|
`from huggingface_hub import from_pretrained_fastai
|
|
4335
4372
|
|
|
@@ -4524,6 +4561,19 @@ var voicecraft = (model) => [
|
|
|
4524
4561
|
|
|
4525
4562
|
model = VoiceCraft.from_pretrained("${model.id}")`
|
|
4526
4563
|
];
|
|
4564
|
+
var chattts = () => [
|
|
4565
|
+
`import ChatTTS
|
|
4566
|
+
import torchaudio
|
|
4567
|
+
|
|
4568
|
+
chat = ChatTTS.Chat()
|
|
4569
|
+
chat.load_models(compile=False) # Set to True for better performance
|
|
4570
|
+
|
|
4571
|
+
texts = ["PUT YOUR TEXT HERE",]
|
|
4572
|
+
|
|
4573
|
+
wavs = chat.infer(texts, )
|
|
4574
|
+
|
|
4575
|
+
torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000)`
|
|
4576
|
+
];
|
|
4527
4577
|
var mlx = (model) => [
|
|
4528
4578
|
`pip install huggingface_hub hf_transfer
|
|
4529
4579
|
|
|
@@ -4638,6 +4688,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
4638
4688
|
wildcard: { path: "*.npz" }
|
|
4639
4689
|
}
|
|
4640
4690
|
},
|
|
4691
|
+
chat_tts: {
|
|
4692
|
+
prettyLabel: "ChatTTS",
|
|
4693
|
+
repoName: "ChatTTS",
|
|
4694
|
+
repoUrl: "https://github.com/2noise/ChatTTS.git",
|
|
4695
|
+
filter: false,
|
|
4696
|
+
countDownloads: { term: { path: "asset/GPT.pt" } },
|
|
4697
|
+
snippets: chattts
|
|
4698
|
+
},
|
|
4641
4699
|
diffusers: {
|
|
4642
4700
|
prettyLabel: "Diffusers",
|
|
4643
4701
|
repoName: "\u{1F917}/diffusers",
|
|
@@ -4689,7 +4747,10 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
4689
4747
|
repoName: "fastText",
|
|
4690
4748
|
repoUrl: "https://fasttext.cc/",
|
|
4691
4749
|
snippets: fasttext,
|
|
4692
|
-
filter: true
|
|
4750
|
+
filter: true,
|
|
4751
|
+
countDownloads: {
|
|
4752
|
+
wildcard: { path: "*.bin" }
|
|
4753
|
+
}
|
|
4693
4754
|
},
|
|
4694
4755
|
flair: {
|
|
4695
4756
|
prettyLabel: "Flair",
|
|
@@ -4888,6 +4949,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
4888
4949
|
term: { path: "hyperparams.yaml" }
|
|
4889
4950
|
}
|
|
4890
4951
|
},
|
|
4952
|
+
"stable-audio-tools": {
|
|
4953
|
+
prettyLabel: "Stable Audio Tools",
|
|
4954
|
+
repoName: "stable-audio-tools",
|
|
4955
|
+
repoUrl: "https://github.com/Stability-AI/stable-audio-tools.git",
|
|
4956
|
+
filter: false,
|
|
4957
|
+
countDownloads: { term: { path: "model.safetensors" } },
|
|
4958
|
+
snippets: stable_audio_tools
|
|
4959
|
+
},
|
|
4891
4960
|
"stable-baselines3": {
|
|
4892
4961
|
prettyLabel: "stable-baselines3",
|
|
4893
4962
|
repoName: "stable-baselines3",
|
|
@@ -5862,20 +5931,25 @@ function isGgufModel(model) {
|
|
|
5862
5931
|
}
|
|
5863
5932
|
var snippetLlamacpp = (model) => {
|
|
5864
5933
|
return [
|
|
5865
|
-
|
|
5934
|
+
`# Option 1: use llama.cpp with brew
|
|
5866
5935
|
brew install llama.cpp
|
|
5867
5936
|
|
|
5868
|
-
|
|
5869
|
-
## see llama.cpp README for compilation flags to optimize for your hardware
|
|
5870
|
-
git clone https://github.com/ggerganov/llama.cpp
|
|
5871
|
-
cd llama.cpp
|
|
5872
|
-
LLAMA_CURL=1 make
|
|
5873
|
-
`,
|
|
5874
|
-
`## Load and run the model
|
|
5937
|
+
# Load and run the model
|
|
5875
5938
|
llama \\
|
|
5876
5939
|
--hf-repo "${model.id}" \\
|
|
5877
5940
|
--hf-file file.gguf \\
|
|
5878
5941
|
-p "I believe the meaning of life is" \\
|
|
5942
|
+
-n 128`,
|
|
5943
|
+
`# Option 2: build llama.cpp from source with curl support
|
|
5944
|
+
git clone https://github.com/ggerganov/llama.cpp.git
|
|
5945
|
+
cd llama.cpp
|
|
5946
|
+
LLAMA_CURL=1 make
|
|
5947
|
+
|
|
5948
|
+
# Load and run the model
|
|
5949
|
+
./main \\
|
|
5950
|
+
--hf-repo "${model.id}" \\
|
|
5951
|
+
-m file.gguf \\
|
|
5952
|
+
-p "I believe the meaning of life is" \\
|
|
5879
5953
|
-n 128`
|
|
5880
5954
|
];
|
|
5881
5955
|
};
|
|
@@ -5915,6 +5989,36 @@ var LOCAL_APPS = {
|
|
|
5915
5989
|
displayOnModelPage: isGgufModel,
|
|
5916
5990
|
deeplink: (model) => new URL(`sanctum://open_from_hf?model=${model.id}`)
|
|
5917
5991
|
},
|
|
5992
|
+
jellybox: {
|
|
5993
|
+
prettyLabel: "Jellybox",
|
|
5994
|
+
docsUrl: "https://jellybox.com",
|
|
5995
|
+
mainTask: "text-generation",
|
|
5996
|
+
displayOnModelPage: (model) => isGgufModel(model) || model.library_name === "diffusers" && model.tags.includes("safetensors") && (model.pipeline_tag === "text-to-image" || model.tags.includes("lora")),
|
|
5997
|
+
deeplink: (model) => {
|
|
5998
|
+
if (isGgufModel(model)) {
|
|
5999
|
+
return new URL(`jellybox://llm/models/huggingface/LLM/${model.id}`);
|
|
6000
|
+
} else if (model.tags.includes("lora")) {
|
|
6001
|
+
return new URL(`jellybox://image/models/huggingface/ImageLora/${model.id}`);
|
|
6002
|
+
} else {
|
|
6003
|
+
return new URL(`jellybox://image/models/huggingface/Image/${model.id}`);
|
|
6004
|
+
}
|
|
6005
|
+
}
|
|
6006
|
+
},
|
|
6007
|
+
msty: {
|
|
6008
|
+
prettyLabel: "Msty",
|
|
6009
|
+
docsUrl: "https://msty.app",
|
|
6010
|
+
mainTask: "text-generation",
|
|
6011
|
+
displayOnModelPage: isGgufModel,
|
|
6012
|
+
deeplink: (model) => new URL(`msty://models/search/hf/${model.id}`)
|
|
6013
|
+
},
|
|
6014
|
+
recursechat: {
|
|
6015
|
+
prettyLabel: "RecurseChat",
|
|
6016
|
+
docsUrl: "https://recurse.chat",
|
|
6017
|
+
mainTask: "text-generation",
|
|
6018
|
+
macOSOnly: true,
|
|
6019
|
+
displayOnModelPage: isGgufModel,
|
|
6020
|
+
deeplink: (model) => new URL(`recursechat://new-hf-gguf-model?hf-model-id=${model.id}`)
|
|
6021
|
+
},
|
|
5918
6022
|
drawthings: {
|
|
5919
6023
|
prettyLabel: "Draw Things",
|
|
5920
6024
|
docsUrl: "https://drawthings.ai",
|
|
@@ -5939,10 +6043,45 @@ var LOCAL_APPS = {
|
|
|
5939
6043
|
deeplink: (model) => new URL(`diffusionbee://open_from_hf?model=${model.id}`)
|
|
5940
6044
|
}
|
|
5941
6045
|
};
|
|
6046
|
+
|
|
6047
|
+
// src/dataset-libraries.ts
|
|
6048
|
+
var DATASET_LIBRARIES_UI_ELEMENTS = {
|
|
6049
|
+
mlcroissant: {
|
|
6050
|
+
prettyLabel: "mlcroissant",
|
|
6051
|
+
repoName: "croissant",
|
|
6052
|
+
repoUrl: "https://github.com/mlcommons/croissant/tree/main/python/mlcroissant",
|
|
6053
|
+
docsUrl: "https://github.com/mlcommons/croissant/blob/main/python/mlcroissant/README.md"
|
|
6054
|
+
},
|
|
6055
|
+
webdataset: {
|
|
6056
|
+
prettyLabel: "WebDataset",
|
|
6057
|
+
repoName: "webdataset",
|
|
6058
|
+
repoUrl: "https://github.com/webdataset/webdataset",
|
|
6059
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-webdataset"
|
|
6060
|
+
},
|
|
6061
|
+
datasets: {
|
|
6062
|
+
prettyLabel: "Datasets",
|
|
6063
|
+
repoName: "datasets",
|
|
6064
|
+
repoUrl: "https://github.com/huggingface/datasets",
|
|
6065
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-usage"
|
|
6066
|
+
},
|
|
6067
|
+
pandas: {
|
|
6068
|
+
prettyLabel: "pandas",
|
|
6069
|
+
repoName: "pandas",
|
|
6070
|
+
repoUrl: "https://github.com/pandas-dev/pandas",
|
|
6071
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-pandas"
|
|
6072
|
+
},
|
|
6073
|
+
dask: {
|
|
6074
|
+
prettyLabel: "Dask",
|
|
6075
|
+
repoName: "dask",
|
|
6076
|
+
repoUrl: "https://github.com/dask/dask",
|
|
6077
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-dask"
|
|
6078
|
+
}
|
|
6079
|
+
};
|
|
5942
6080
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5943
6081
|
0 && (module.exports = {
|
|
5944
6082
|
ALL_DISPLAY_MODEL_LIBRARY_KEYS,
|
|
5945
6083
|
ALL_MODEL_LIBRARY_KEYS,
|
|
6084
|
+
DATASET_LIBRARIES_UI_ELEMENTS,
|
|
5946
6085
|
DEFAULT_MEMORY_OPTIONS,
|
|
5947
6086
|
InferenceDisplayability,
|
|
5948
6087
|
LIBRARY_TASK_MAPPING,
|
package/dist/index.js
CHANGED
|
@@ -4292,6 +4292,42 @@ var sklearn = (model) => {
|
|
|
4292
4292
|
return skopsJobLib(model);
|
|
4293
4293
|
}
|
|
4294
4294
|
};
|
|
4295
|
+
var stable_audio_tools = (model) => [
|
|
4296
|
+
`import torch
|
|
4297
|
+
import torchaudio
|
|
4298
|
+
from einops import rearrange
|
|
4299
|
+
from stable_audio_tools import get_pretrained_model
|
|
4300
|
+
from stable_audio_tools.inference.generation import generate_diffusion_cond
|
|
4301
|
+
|
|
4302
|
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
4303
|
+
|
|
4304
|
+
# Download model
|
|
4305
|
+
model, model_config = get_pretrained_model("${model.id}")
|
|
4306
|
+
sample_rate = model_config["sample_rate"]
|
|
4307
|
+
sample_size = model_config["sample_size"]
|
|
4308
|
+
|
|
4309
|
+
model = model.to(device)
|
|
4310
|
+
|
|
4311
|
+
# Set up text and timing conditioning
|
|
4312
|
+
conditioning = [{
|
|
4313
|
+
"prompt": "128 BPM tech house drum loop",
|
|
4314
|
+
}]
|
|
4315
|
+
|
|
4316
|
+
# Generate stereo audio
|
|
4317
|
+
output = generate_diffusion_cond(
|
|
4318
|
+
model,
|
|
4319
|
+
conditioning=conditioning,
|
|
4320
|
+
sample_size=sample_size,
|
|
4321
|
+
device=device
|
|
4322
|
+
)
|
|
4323
|
+
|
|
4324
|
+
# Rearrange audio batch to a single sequence
|
|
4325
|
+
output = rearrange(output, "b d n -> d (b n)")
|
|
4326
|
+
|
|
4327
|
+
# Peak normalize, clip, convert to int16, and save to file
|
|
4328
|
+
output = output.to(torch.float32).div(torch.max(torch.abs(output))).clamp(-1, 1).mul(32767).to(torch.int16).cpu()
|
|
4329
|
+
torchaudio.save("output.wav", output, sample_rate)`
|
|
4330
|
+
];
|
|
4295
4331
|
var fastai = (model) => [
|
|
4296
4332
|
`from huggingface_hub import from_pretrained_fastai
|
|
4297
4333
|
|
|
@@ -4486,6 +4522,19 @@ var voicecraft = (model) => [
|
|
|
4486
4522
|
|
|
4487
4523
|
model = VoiceCraft.from_pretrained("${model.id}")`
|
|
4488
4524
|
];
|
|
4525
|
+
var chattts = () => [
|
|
4526
|
+
`import ChatTTS
|
|
4527
|
+
import torchaudio
|
|
4528
|
+
|
|
4529
|
+
chat = ChatTTS.Chat()
|
|
4530
|
+
chat.load_models(compile=False) # Set to True for better performance
|
|
4531
|
+
|
|
4532
|
+
texts = ["PUT YOUR TEXT HERE",]
|
|
4533
|
+
|
|
4534
|
+
wavs = chat.infer(texts, )
|
|
4535
|
+
|
|
4536
|
+
torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000)`
|
|
4537
|
+
];
|
|
4489
4538
|
var mlx = (model) => [
|
|
4490
4539
|
`pip install huggingface_hub hf_transfer
|
|
4491
4540
|
|
|
@@ -4600,6 +4649,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
4600
4649
|
wildcard: { path: "*.npz" }
|
|
4601
4650
|
}
|
|
4602
4651
|
},
|
|
4652
|
+
chat_tts: {
|
|
4653
|
+
prettyLabel: "ChatTTS",
|
|
4654
|
+
repoName: "ChatTTS",
|
|
4655
|
+
repoUrl: "https://github.com/2noise/ChatTTS.git",
|
|
4656
|
+
filter: false,
|
|
4657
|
+
countDownloads: { term: { path: "asset/GPT.pt" } },
|
|
4658
|
+
snippets: chattts
|
|
4659
|
+
},
|
|
4603
4660
|
diffusers: {
|
|
4604
4661
|
prettyLabel: "Diffusers",
|
|
4605
4662
|
repoName: "\u{1F917}/diffusers",
|
|
@@ -4651,7 +4708,10 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
4651
4708
|
repoName: "fastText",
|
|
4652
4709
|
repoUrl: "https://fasttext.cc/",
|
|
4653
4710
|
snippets: fasttext,
|
|
4654
|
-
filter: true
|
|
4711
|
+
filter: true,
|
|
4712
|
+
countDownloads: {
|
|
4713
|
+
wildcard: { path: "*.bin" }
|
|
4714
|
+
}
|
|
4655
4715
|
},
|
|
4656
4716
|
flair: {
|
|
4657
4717
|
prettyLabel: "Flair",
|
|
@@ -4850,6 +4910,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
4850
4910
|
term: { path: "hyperparams.yaml" }
|
|
4851
4911
|
}
|
|
4852
4912
|
},
|
|
4913
|
+
"stable-audio-tools": {
|
|
4914
|
+
prettyLabel: "Stable Audio Tools",
|
|
4915
|
+
repoName: "stable-audio-tools",
|
|
4916
|
+
repoUrl: "https://github.com/Stability-AI/stable-audio-tools.git",
|
|
4917
|
+
filter: false,
|
|
4918
|
+
countDownloads: { term: { path: "model.safetensors" } },
|
|
4919
|
+
snippets: stable_audio_tools
|
|
4920
|
+
},
|
|
4853
4921
|
"stable-baselines3": {
|
|
4854
4922
|
prettyLabel: "stable-baselines3",
|
|
4855
4923
|
repoName: "stable-baselines3",
|
|
@@ -5824,20 +5892,25 @@ function isGgufModel(model) {
|
|
|
5824
5892
|
}
|
|
5825
5893
|
var snippetLlamacpp = (model) => {
|
|
5826
5894
|
return [
|
|
5827
|
-
|
|
5895
|
+
`# Option 1: use llama.cpp with brew
|
|
5828
5896
|
brew install llama.cpp
|
|
5829
5897
|
|
|
5830
|
-
|
|
5831
|
-
## see llama.cpp README for compilation flags to optimize for your hardware
|
|
5832
|
-
git clone https://github.com/ggerganov/llama.cpp
|
|
5833
|
-
cd llama.cpp
|
|
5834
|
-
LLAMA_CURL=1 make
|
|
5835
|
-
`,
|
|
5836
|
-
`## Load and run the model
|
|
5898
|
+
# Load and run the model
|
|
5837
5899
|
llama \\
|
|
5838
5900
|
--hf-repo "${model.id}" \\
|
|
5839
5901
|
--hf-file file.gguf \\
|
|
5840
5902
|
-p "I believe the meaning of life is" \\
|
|
5903
|
+
-n 128`,
|
|
5904
|
+
`# Option 2: build llama.cpp from source with curl support
|
|
5905
|
+
git clone https://github.com/ggerganov/llama.cpp.git
|
|
5906
|
+
cd llama.cpp
|
|
5907
|
+
LLAMA_CURL=1 make
|
|
5908
|
+
|
|
5909
|
+
# Load and run the model
|
|
5910
|
+
./main \\
|
|
5911
|
+
--hf-repo "${model.id}" \\
|
|
5912
|
+
-m file.gguf \\
|
|
5913
|
+
-p "I believe the meaning of life is" \\
|
|
5841
5914
|
-n 128`
|
|
5842
5915
|
];
|
|
5843
5916
|
};
|
|
@@ -5877,6 +5950,36 @@ var LOCAL_APPS = {
|
|
|
5877
5950
|
displayOnModelPage: isGgufModel,
|
|
5878
5951
|
deeplink: (model) => new URL(`sanctum://open_from_hf?model=${model.id}`)
|
|
5879
5952
|
},
|
|
5953
|
+
jellybox: {
|
|
5954
|
+
prettyLabel: "Jellybox",
|
|
5955
|
+
docsUrl: "https://jellybox.com",
|
|
5956
|
+
mainTask: "text-generation",
|
|
5957
|
+
displayOnModelPage: (model) => isGgufModel(model) || model.library_name === "diffusers" && model.tags.includes("safetensors") && (model.pipeline_tag === "text-to-image" || model.tags.includes("lora")),
|
|
5958
|
+
deeplink: (model) => {
|
|
5959
|
+
if (isGgufModel(model)) {
|
|
5960
|
+
return new URL(`jellybox://llm/models/huggingface/LLM/${model.id}`);
|
|
5961
|
+
} else if (model.tags.includes("lora")) {
|
|
5962
|
+
return new URL(`jellybox://image/models/huggingface/ImageLora/${model.id}`);
|
|
5963
|
+
} else {
|
|
5964
|
+
return new URL(`jellybox://image/models/huggingface/Image/${model.id}`);
|
|
5965
|
+
}
|
|
5966
|
+
}
|
|
5967
|
+
},
|
|
5968
|
+
msty: {
|
|
5969
|
+
prettyLabel: "Msty",
|
|
5970
|
+
docsUrl: "https://msty.app",
|
|
5971
|
+
mainTask: "text-generation",
|
|
5972
|
+
displayOnModelPage: isGgufModel,
|
|
5973
|
+
deeplink: (model) => new URL(`msty://models/search/hf/${model.id}`)
|
|
5974
|
+
},
|
|
5975
|
+
recursechat: {
|
|
5976
|
+
prettyLabel: "RecurseChat",
|
|
5977
|
+
docsUrl: "https://recurse.chat",
|
|
5978
|
+
mainTask: "text-generation",
|
|
5979
|
+
macOSOnly: true,
|
|
5980
|
+
displayOnModelPage: isGgufModel,
|
|
5981
|
+
deeplink: (model) => new URL(`recursechat://new-hf-gguf-model?hf-model-id=${model.id}`)
|
|
5982
|
+
},
|
|
5880
5983
|
drawthings: {
|
|
5881
5984
|
prettyLabel: "Draw Things",
|
|
5882
5985
|
docsUrl: "https://drawthings.ai",
|
|
@@ -5901,9 +6004,44 @@ var LOCAL_APPS = {
|
|
|
5901
6004
|
deeplink: (model) => new URL(`diffusionbee://open_from_hf?model=${model.id}`)
|
|
5902
6005
|
}
|
|
5903
6006
|
};
|
|
6007
|
+
|
|
6008
|
+
// src/dataset-libraries.ts
|
|
6009
|
+
var DATASET_LIBRARIES_UI_ELEMENTS = {
|
|
6010
|
+
mlcroissant: {
|
|
6011
|
+
prettyLabel: "mlcroissant",
|
|
6012
|
+
repoName: "croissant",
|
|
6013
|
+
repoUrl: "https://github.com/mlcommons/croissant/tree/main/python/mlcroissant",
|
|
6014
|
+
docsUrl: "https://github.com/mlcommons/croissant/blob/main/python/mlcroissant/README.md"
|
|
6015
|
+
},
|
|
6016
|
+
webdataset: {
|
|
6017
|
+
prettyLabel: "WebDataset",
|
|
6018
|
+
repoName: "webdataset",
|
|
6019
|
+
repoUrl: "https://github.com/webdataset/webdataset",
|
|
6020
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-webdataset"
|
|
6021
|
+
},
|
|
6022
|
+
datasets: {
|
|
6023
|
+
prettyLabel: "Datasets",
|
|
6024
|
+
repoName: "datasets",
|
|
6025
|
+
repoUrl: "https://github.com/huggingface/datasets",
|
|
6026
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-usage"
|
|
6027
|
+
},
|
|
6028
|
+
pandas: {
|
|
6029
|
+
prettyLabel: "pandas",
|
|
6030
|
+
repoName: "pandas",
|
|
6031
|
+
repoUrl: "https://github.com/pandas-dev/pandas",
|
|
6032
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-pandas"
|
|
6033
|
+
},
|
|
6034
|
+
dask: {
|
|
6035
|
+
prettyLabel: "Dask",
|
|
6036
|
+
repoName: "dask",
|
|
6037
|
+
repoUrl: "https://github.com/dask/dask",
|
|
6038
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-dask"
|
|
6039
|
+
}
|
|
6040
|
+
};
|
|
5904
6041
|
export {
|
|
5905
6042
|
ALL_DISPLAY_MODEL_LIBRARY_KEYS,
|
|
5906
6043
|
ALL_MODEL_LIBRARY_KEYS,
|
|
6044
|
+
DATASET_LIBRARIES_UI_ELEMENTS,
|
|
5907
6045
|
DEFAULT_MEMORY_OPTIONS,
|
|
5908
6046
|
InferenceDisplayability,
|
|
5909
6047
|
LIBRARY_TASK_MAPPING,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elements configurable by a dataset library.
|
|
3
|
+
*/
|
|
4
|
+
export interface DatasetLibraryUiElement {
|
|
5
|
+
/**
|
|
6
|
+
* Pretty name of the library.
|
|
7
|
+
* displayed (in tags?, and) on the main
|
|
8
|
+
* call-to-action button on the dataset page.
|
|
9
|
+
*/
|
|
10
|
+
prettyLabel: string;
|
|
11
|
+
/**
|
|
12
|
+
* Repo name of the library's (usually on GitHub) code repo
|
|
13
|
+
*/
|
|
14
|
+
repoName: string;
|
|
15
|
+
/**
|
|
16
|
+
* URL to library's (usually on GitHub) code repo
|
|
17
|
+
*/
|
|
18
|
+
repoUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* URL to library's docs
|
|
21
|
+
*/
|
|
22
|
+
docsUrl?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const DATASET_LIBRARIES_UI_ELEMENTS: {
|
|
25
|
+
mlcroissant: {
|
|
26
|
+
prettyLabel: string;
|
|
27
|
+
repoName: string;
|
|
28
|
+
repoUrl: string;
|
|
29
|
+
docsUrl: string;
|
|
30
|
+
};
|
|
31
|
+
webdataset: {
|
|
32
|
+
prettyLabel: string;
|
|
33
|
+
repoName: string;
|
|
34
|
+
repoUrl: string;
|
|
35
|
+
docsUrl: string;
|
|
36
|
+
};
|
|
37
|
+
datasets: {
|
|
38
|
+
prettyLabel: string;
|
|
39
|
+
repoName: string;
|
|
40
|
+
repoUrl: string;
|
|
41
|
+
docsUrl: string;
|
|
42
|
+
};
|
|
43
|
+
pandas: {
|
|
44
|
+
prettyLabel: string;
|
|
45
|
+
repoName: string;
|
|
46
|
+
repoUrl: string;
|
|
47
|
+
docsUrl: string;
|
|
48
|
+
};
|
|
49
|
+
dask: {
|
|
50
|
+
prettyLabel: string;
|
|
51
|
+
repoName: string;
|
|
52
|
+
repoUrl: string;
|
|
53
|
+
docsUrl: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export type DatasetLibraryKey = keyof typeof DATASET_LIBRARIES_UI_ELEMENTS;
|
|
57
|
+
//# sourceMappingURL=dataset-libraries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataset-libraries.d.ts","sourceRoot":"","sources":["../../src/dataset-libraries.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BS,CAAC;AAGpD,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,6BAA6B,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -16,4 +16,6 @@ export { SKUS, DEFAULT_MEMORY_OPTIONS } from "./hardware";
|
|
|
16
16
|
export type { HardwareSpec, SkuType } from "./hardware";
|
|
17
17
|
export { LOCAL_APPS } from "./local-apps";
|
|
18
18
|
export type { LocalApp, LocalAppKey } from "./local-apps";
|
|
19
|
+
export { DATASET_LIBRARIES_UI_ELEMENTS } from "./dataset-libraries";
|
|
20
|
+
export type { DatasetLibraryUiElement, DatasetLibraryKey } from "./dataset-libraries";
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9E,cAAc,SAAS,CAAC;AACxB,OAAO,EACN,aAAa,EACb,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,UAAU,EACV,eAAe,EACf,aAAa,EACb,kBAAkB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AACxH,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC3E,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,YA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|
deeplink: (model: ModelData) => URL;
|
|
86
86
|
};
|
|
87
|
+
jellybox: {
|
|
88
|
+
prettyLabel: string;
|
|
89
|
+
docsUrl: string;
|
|
90
|
+
mainTask: "text-generation";
|
|
91
|
+
displayOnModelPage: (model: ModelData) => boolean;
|
|
92
|
+
deeplink: (model: ModelData) => URL;
|
|
93
|
+
};
|
|
94
|
+
msty: {
|
|
95
|
+
prettyLabel: string;
|
|
96
|
+
docsUrl: string;
|
|
97
|
+
mainTask: "text-generation";
|
|
98
|
+
displayOnModelPage: typeof isGgufModel;
|
|
99
|
+
deeplink: (model: ModelData) => URL;
|
|
100
|
+
};
|
|
101
|
+
recursechat: {
|
|
102
|
+
prettyLabel: string;
|
|
103
|
+
docsUrl: string;
|
|
104
|
+
mainTask: "text-generation";
|
|
105
|
+
macOSOnly: true;
|
|
106
|
+
displayOnModelPage: typeof isGgufModel;
|
|
107
|
+
deeplink: (model: ModelData) => URL;
|
|
108
|
+
};
|
|
87
109
|
drawthings: {
|
|
88
110
|
prettyLabel: string;
|
|
89
111
|
docsUrl: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-apps.d.ts","sourceRoot":"","sources":["../../src/local-apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,kBAAkB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC;CAClD,GAAG,CACD;IACA;;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AO,UAAU,CAAC"}
|
|
@@ -19,6 +19,7 @@ export declare const pyannote_audio: (model: ModelData) => string[];
|
|
|
19
19
|
export declare const tensorflowtts: (model: ModelData) => string[];
|
|
20
20
|
export declare const timm: (model: ModelData) => string[];
|
|
21
21
|
export declare const sklearn: (model: ModelData) => string[];
|
|
22
|
+
export declare const stable_audio_tools: (model: ModelData) => string[];
|
|
22
23
|
export declare const fastai: (model: ModelData) => string[];
|
|
23
24
|
export declare const sampleFactory: (model: ModelData) => string[];
|
|
24
25
|
export declare const sentenceTransformers: (model: ModelData) => string[];
|
|
@@ -35,6 +36,7 @@ export declare const stableBaselines3: (model: ModelData) => string[];
|
|
|
35
36
|
export declare const mlAgents: (model: ModelData) => string[];
|
|
36
37
|
export declare const sentis: () => string[];
|
|
37
38
|
export declare const voicecraft: (model: ModelData) => string[];
|
|
39
|
+
export declare const chattts: () => string[];
|
|
38
40
|
export declare const mlx: (model: ModelData) => string[];
|
|
39
41
|
export declare const mlxim: (model: ModelData) => string[];
|
|
40
42
|
export declare const nemo: (model: ModelData) => string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries-snippets.d.ts","sourceRoot":"","sources":["../../src/model-libraries-snippets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAY9C,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAkBF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AAMF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AA+BF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAUlD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAMlD,CAAC;AAEF,eAAO,MAAM,SAAS,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|
|
@@ -113,6 +113,18 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
|
+
chat_tts: {
|
|
117
|
+
prettyLabel: string;
|
|
118
|
+
repoName: string;
|
|
119
|
+
repoUrl: string;
|
|
120
|
+
filter: false;
|
|
121
|
+
countDownloads: {
|
|
122
|
+
term: {
|
|
123
|
+
path: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
snippets: () => string[];
|
|
127
|
+
};
|
|
116
128
|
diffusers: {
|
|
117
129
|
prettyLabel: string;
|
|
118
130
|
repoName: string;
|
|
@@ -166,6 +178,11 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
166
178
|
repoUrl: string;
|
|
167
179
|
snippets: (model: ModelData) => string[];
|
|
168
180
|
filter: true;
|
|
181
|
+
countDownloads: {
|
|
182
|
+
wildcard: {
|
|
183
|
+
path: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
169
186
|
};
|
|
170
187
|
flair: {
|
|
171
188
|
prettyLabel: string;
|
|
@@ -404,6 +421,18 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
404
421
|
};
|
|
405
422
|
};
|
|
406
423
|
};
|
|
424
|
+
"stable-audio-tools": {
|
|
425
|
+
prettyLabel: string;
|
|
426
|
+
repoName: string;
|
|
427
|
+
repoUrl: string;
|
|
428
|
+
filter: false;
|
|
429
|
+
countDownloads: {
|
|
430
|
+
term: {
|
|
431
|
+
path: string;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
snippets: (model: ModelData) => string[];
|
|
435
|
+
};
|
|
407
436
|
"stable-baselines3": {
|
|
408
437
|
prettyLabel: string;
|
|
409
438
|
repoName: string;
|
|
@@ -507,6 +536,6 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
507
536
|
};
|
|
508
537
|
};
|
|
509
538
|
export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
|
|
510
|
-
export declare const ALL_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "big_vision" | "diffusers" | "doctr" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gliner" | "grok" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-baselines3" | "stanza" | "tensorflowtts" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
|
|
511
|
-
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "big_vision" | "diffusers" | "doctr" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gliner" | "grok" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-baselines3" | "stanza" | "tensorflowtts" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
|
|
539
|
+
export declare const ALL_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "big_vision" | "chat_tts" | "diffusers" | "doctr" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gliner" | "grok" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "stable-baselines3" | "stanza" | "tensorflowtts" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
|
|
540
|
+
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "big_vision" | "chat_tts" | "diffusers" | "doctr" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gliner" | "grok" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "stable-baselines3" | "stanza" | "tensorflowtts" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
|
|
512
541
|
//# sourceMappingURL=model-libraries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries.d.ts","sourceRoot":"","sources":["../../src/model-libraries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,EAAE,CAAC;IAC1C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,sBAAsB,CAAC;IAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ZI,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAEvE,eAAO,MAAM,sBAAsB,ypBAAgE,CAAC;AAEpG,eAAO,MAAM,8BAA8B,ypBAQ1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huggingface/tasks",
|
|
3
3
|
"packageManager": "pnpm@8.10.5",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.12",
|
|
5
5
|
"description": "List of ML tasks for huggingface.co/tasks",
|
|
6
6
|
"repository": "https://github.com/huggingface/huggingface.js.git",
|
|
7
7
|
"publishConfig": {
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elements configurable by a dataset library.
|
|
3
|
+
*/
|
|
4
|
+
export interface DatasetLibraryUiElement {
|
|
5
|
+
/**
|
|
6
|
+
* Pretty name of the library.
|
|
7
|
+
* displayed (in tags?, and) on the main
|
|
8
|
+
* call-to-action button on the dataset page.
|
|
9
|
+
*/
|
|
10
|
+
prettyLabel: string;
|
|
11
|
+
/**
|
|
12
|
+
* Repo name of the library's (usually on GitHub) code repo
|
|
13
|
+
*/
|
|
14
|
+
repoName: string;
|
|
15
|
+
/**
|
|
16
|
+
* URL to library's (usually on GitHub) code repo
|
|
17
|
+
*/
|
|
18
|
+
repoUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* URL to library's docs
|
|
21
|
+
*/
|
|
22
|
+
docsUrl?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const DATASET_LIBRARIES_UI_ELEMENTS = {
|
|
26
|
+
mlcroissant: {
|
|
27
|
+
prettyLabel: "mlcroissant",
|
|
28
|
+
repoName: "croissant",
|
|
29
|
+
repoUrl: "https://github.com/mlcommons/croissant/tree/main/python/mlcroissant",
|
|
30
|
+
docsUrl: "https://github.com/mlcommons/croissant/blob/main/python/mlcroissant/README.md",
|
|
31
|
+
},
|
|
32
|
+
webdataset: {
|
|
33
|
+
prettyLabel: "WebDataset",
|
|
34
|
+
repoName: "webdataset",
|
|
35
|
+
repoUrl: "https://github.com/webdataset/webdataset",
|
|
36
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-webdataset",
|
|
37
|
+
},
|
|
38
|
+
datasets: {
|
|
39
|
+
prettyLabel: "Datasets",
|
|
40
|
+
repoName: "datasets",
|
|
41
|
+
repoUrl: "https://github.com/huggingface/datasets",
|
|
42
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-usage",
|
|
43
|
+
},
|
|
44
|
+
pandas: {
|
|
45
|
+
prettyLabel: "pandas",
|
|
46
|
+
repoName: "pandas",
|
|
47
|
+
repoUrl: "https://github.com/pandas-dev/pandas",
|
|
48
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-pandas",
|
|
49
|
+
},
|
|
50
|
+
dask: {
|
|
51
|
+
prettyLabel: "Dask",
|
|
52
|
+
repoName: "dask",
|
|
53
|
+
repoUrl: "https://github.com/dask/dask",
|
|
54
|
+
docsUrl: "https://huggingface.co/docs/hub/datasets-dask",
|
|
55
|
+
},
|
|
56
|
+
} satisfies Record<string, DatasetLibraryUiElement>;
|
|
57
|
+
|
|
58
|
+
/// List of the dataset libraries supported by the Hub
|
|
59
|
+
export type DatasetLibraryKey = keyof typeof DATASET_LIBRARIES_UI_ELEMENTS;
|
package/src/index.ts
CHANGED
|
@@ -49,3 +49,6 @@ export { SKUS, DEFAULT_MEMORY_OPTIONS } from "./hardware";
|
|
|
49
49
|
export type { HardwareSpec, SkuType } from "./hardware";
|
|
50
50
|
export { LOCAL_APPS } from "./local-apps";
|
|
51
51
|
export type { LocalApp, LocalAppKey } from "./local-apps";
|
|
52
|
+
|
|
53
|
+
export { DATASET_LIBRARIES_UI_ELEMENTS } from "./dataset-libraries";
|
|
54
|
+
export type { DatasetLibraryUiElement, DatasetLibraryKey } from "./dataset-libraries";
|
package/src/local-apps.ts
CHANGED
|
@@ -48,20 +48,25 @@ function isGgufModel(model: ModelData) {
|
|
|
48
48
|
|
|
49
49
|
const snippetLlamacpp = (model: ModelData): string[] => {
|
|
50
50
|
return [
|
|
51
|
-
|
|
51
|
+
`# Option 1: use llama.cpp with brew
|
|
52
52
|
brew install llama.cpp
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
## see llama.cpp README for compilation flags to optimize for your hardware
|
|
56
|
-
git clone https://github.com/ggerganov/llama.cpp
|
|
57
|
-
cd llama.cpp
|
|
58
|
-
LLAMA_CURL=1 make
|
|
59
|
-
`,
|
|
60
|
-
`## Load and run the model
|
|
54
|
+
# Load and run the model
|
|
61
55
|
llama \\
|
|
62
56
|
--hf-repo "${model.id}" \\
|
|
63
57
|
--hf-file file.gguf \\
|
|
64
58
|
-p "I believe the meaning of life is" \\
|
|
59
|
+
-n 128`,
|
|
60
|
+
`# Option 2: build llama.cpp from source with curl support
|
|
61
|
+
git clone https://github.com/ggerganov/llama.cpp.git
|
|
62
|
+
cd llama.cpp
|
|
63
|
+
LLAMA_CURL=1 make
|
|
64
|
+
|
|
65
|
+
# Load and run the model
|
|
66
|
+
./main \\
|
|
67
|
+
--hf-repo "${model.id}" \\
|
|
68
|
+
-m file.gguf \\
|
|
69
|
+
-p "I believe the meaning of life is" \\
|
|
65
70
|
-n 128`,
|
|
66
71
|
];
|
|
67
72
|
};
|
|
@@ -113,6 +118,40 @@ export const LOCAL_APPS = {
|
|
|
113
118
|
displayOnModelPage: isGgufModel,
|
|
114
119
|
deeplink: (model) => new URL(`sanctum://open_from_hf?model=${model.id}`),
|
|
115
120
|
},
|
|
121
|
+
jellybox: {
|
|
122
|
+
prettyLabel: "Jellybox",
|
|
123
|
+
docsUrl: "https://jellybox.com",
|
|
124
|
+
mainTask: "text-generation",
|
|
125
|
+
displayOnModelPage: (model) =>
|
|
126
|
+
isGgufModel(model) ||
|
|
127
|
+
(model.library_name === "diffusers" &&
|
|
128
|
+
model.tags.includes("safetensors") &&
|
|
129
|
+
(model.pipeline_tag === "text-to-image" || model.tags.includes("lora"))),
|
|
130
|
+
deeplink: (model) => {
|
|
131
|
+
if (isGgufModel(model)) {
|
|
132
|
+
return new URL(`jellybox://llm/models/huggingface/LLM/${model.id}`);
|
|
133
|
+
} else if (model.tags.includes("lora")) {
|
|
134
|
+
return new URL(`jellybox://image/models/huggingface/ImageLora/${model.id}`);
|
|
135
|
+
} else {
|
|
136
|
+
return new URL(`jellybox://image/models/huggingface/Image/${model.id}`);
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
msty: {
|
|
141
|
+
prettyLabel: "Msty",
|
|
142
|
+
docsUrl: "https://msty.app",
|
|
143
|
+
mainTask: "text-generation",
|
|
144
|
+
displayOnModelPage: isGgufModel,
|
|
145
|
+
deeplink: (model) => new URL(`msty://models/search/hf/${model.id}`),
|
|
146
|
+
},
|
|
147
|
+
recursechat: {
|
|
148
|
+
prettyLabel: "RecurseChat",
|
|
149
|
+
docsUrl: "https://recurse.chat",
|
|
150
|
+
mainTask: "text-generation",
|
|
151
|
+
macOSOnly: true,
|
|
152
|
+
displayOnModelPage: isGgufModel,
|
|
153
|
+
deeplink: (model) => new URL(`recursechat://new-hf-gguf-model?hf-model-id=${model.id}`),
|
|
154
|
+
},
|
|
116
155
|
drawthings: {
|
|
117
156
|
prettyLabel: "Draw Things",
|
|
118
157
|
docsUrl: "https://drawthings.ai",
|
|
@@ -326,6 +326,43 @@ export const sklearn = (model: ModelData): string[] => {
|
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
328
|
|
|
329
|
+
export const stable_audio_tools = (model: ModelData): string[] => [
|
|
330
|
+
`import torch
|
|
331
|
+
import torchaudio
|
|
332
|
+
from einops import rearrange
|
|
333
|
+
from stable_audio_tools import get_pretrained_model
|
|
334
|
+
from stable_audio_tools.inference.generation import generate_diffusion_cond
|
|
335
|
+
|
|
336
|
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
337
|
+
|
|
338
|
+
# Download model
|
|
339
|
+
model, model_config = get_pretrained_model("${model.id}")
|
|
340
|
+
sample_rate = model_config["sample_rate"]
|
|
341
|
+
sample_size = model_config["sample_size"]
|
|
342
|
+
|
|
343
|
+
model = model.to(device)
|
|
344
|
+
|
|
345
|
+
# Set up text and timing conditioning
|
|
346
|
+
conditioning = [{
|
|
347
|
+
"prompt": "128 BPM tech house drum loop",
|
|
348
|
+
}]
|
|
349
|
+
|
|
350
|
+
# Generate stereo audio
|
|
351
|
+
output = generate_diffusion_cond(
|
|
352
|
+
model,
|
|
353
|
+
conditioning=conditioning,
|
|
354
|
+
sample_size=sample_size,
|
|
355
|
+
device=device
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
# Rearrange audio batch to a single sequence
|
|
359
|
+
output = rearrange(output, "b d n -> d (b n)")
|
|
360
|
+
|
|
361
|
+
# Peak normalize, clip, convert to int16, and save to file
|
|
362
|
+
output = output.to(torch.float32).div(torch.max(torch.abs(output))).clamp(-1, 1).mul(32767).to(torch.int16).cpu()
|
|
363
|
+
torchaudio.save("output.wav", output, sample_rate)`,
|
|
364
|
+
];
|
|
365
|
+
|
|
329
366
|
export const fastai = (model: ModelData): string[] => [
|
|
330
367
|
`from huggingface_hub import from_pretrained_fastai
|
|
331
368
|
|
|
@@ -553,6 +590,20 @@ export const voicecraft = (model: ModelData): string[] => [
|
|
|
553
590
|
model = VoiceCraft.from_pretrained("${model.id}")`,
|
|
554
591
|
];
|
|
555
592
|
|
|
593
|
+
export const chattts = (): string[] => [
|
|
594
|
+
`import ChatTTS
|
|
595
|
+
import torchaudio
|
|
596
|
+
|
|
597
|
+
chat = ChatTTS.Chat()
|
|
598
|
+
chat.load_models(compile=False) # Set to True for better performance
|
|
599
|
+
|
|
600
|
+
texts = ["PUT YOUR TEXT HERE",]
|
|
601
|
+
|
|
602
|
+
wavs = chat.infer(texts, )
|
|
603
|
+
|
|
604
|
+
torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000)`,
|
|
605
|
+
];
|
|
606
|
+
|
|
556
607
|
export const mlx = (model: ModelData): string[] => [
|
|
557
608
|
`pip install huggingface_hub hf_transfer
|
|
558
609
|
|
package/src/model-libraries.ts
CHANGED
|
@@ -111,6 +111,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
111
111
|
wildcard: { path: "*.npz" },
|
|
112
112
|
},
|
|
113
113
|
},
|
|
114
|
+
chat_tts: {
|
|
115
|
+
prettyLabel: "ChatTTS",
|
|
116
|
+
repoName: "ChatTTS",
|
|
117
|
+
repoUrl: "https://github.com/2noise/ChatTTS.git",
|
|
118
|
+
filter: false,
|
|
119
|
+
countDownloads: { term: { path: "asset/GPT.pt" } },
|
|
120
|
+
snippets: snippets.chattts,
|
|
121
|
+
},
|
|
114
122
|
diffusers: {
|
|
115
123
|
prettyLabel: "Diffusers",
|
|
116
124
|
repoName: "🤗/diffusers",
|
|
@@ -163,6 +171,9 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
163
171
|
repoUrl: "https://fasttext.cc/",
|
|
164
172
|
snippets: snippets.fasttext,
|
|
165
173
|
filter: true,
|
|
174
|
+
countDownloads: {
|
|
175
|
+
wildcard: { path: "*.bin" },
|
|
176
|
+
},
|
|
166
177
|
},
|
|
167
178
|
flair: {
|
|
168
179
|
prettyLabel: "Flair",
|
|
@@ -361,6 +372,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
361
372
|
term: { path: "hyperparams.yaml" },
|
|
362
373
|
},
|
|
363
374
|
},
|
|
375
|
+
"stable-audio-tools": {
|
|
376
|
+
prettyLabel: "Stable Audio Tools",
|
|
377
|
+
repoName: "stable-audio-tools",
|
|
378
|
+
repoUrl: "https://github.com/Stability-AI/stable-audio-tools.git",
|
|
379
|
+
filter: false,
|
|
380
|
+
countDownloads: { term: { path: "model.safetensors" } },
|
|
381
|
+
snippets: snippets.stable_audio_tools,
|
|
382
|
+
},
|
|
364
383
|
"stable-baselines3": {
|
|
365
384
|
prettyLabel: "stable-baselines3",
|
|
366
385
|
repoName: "stable-baselines3",
|
|
@@ -36,7 +36,7 @@ def query(filename):
|
|
|
36
36
|
data = query("sample1.flac")
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
You can also use[huggingface.js](https://github.com/huggingface/huggingface.js), the JavaScript client, to transcribe
|
|
39
|
+
You can also use [huggingface.js](https://github.com/huggingface/huggingface.js), the JavaScript client, to transcribe audio with the Serverless Inference API.
|
|
40
40
|
|
|
41
41
|
```javascript
|
|
42
42
|
import { HfInference } from "@huggingface/inference";
|
|
@@ -48,7 +48,7 @@ await inference.automaticSpeechRecognition({
|
|
|
48
48
|
});
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
For transformers
|
|
51
|
+
For transformers-compatible models like Whisper, Wav2Vec2, and HuBERT, you can also run inference with the library as follows:
|
|
52
52
|
|
|
53
53
|
```python
|
|
54
54
|
# pip install --upgrade transformers
|