Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
machineuser
commited on
Commit
·
871c193
1
Parent(s):
7a947fe
Sync widgets demo
Browse files
packages/tasks/src/library-to-tasks.ts
CHANGED
@@ -31,6 +31,7 @@ export const LIBRARY_TASK_MAPPING_EXCLUDING_TRANSFORMERS: Partial<Record<ModelLi
|
|
31 |
peft: ["text-generation"],
|
32 |
"pyannote-audio": ["automatic-speech-recognition"],
|
33 |
"sentence-transformers": ["feature-extraction", "sentence-similarity"],
|
|
|
34 |
sklearn: ["tabular-classification", "tabular-regression", "text-classification"],
|
35 |
spacy: ["token-classification", "text-classification", "sentence-similarity"],
|
36 |
"span-marker": ["token-classification"],
|
|
|
31 |
peft: ["text-generation"],
|
32 |
"pyannote-audio": ["automatic-speech-recognition"],
|
33 |
"sentence-transformers": ["feature-extraction", "sentence-similarity"],
|
34 |
+
setfit: ["text-classification"],
|
35 |
sklearn: ["tabular-classification", "tabular-regression", "text-classification"],
|
36 |
spacy: ["token-classification", "text-classification", "sentence-similarity"],
|
37 |
"span-marker": ["token-classification"],
|
packages/tasks/src/library-ui-elements.ts
CHANGED
@@ -358,6 +358,12 @@ const sentenceTransformers = (model: ModelData) => [
|
|
358 |
model = SentenceTransformer("${model.id}")`,
|
359 |
];
|
360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
const spacy = (model: ModelData) => [
|
362 |
`!pip install https://huggingface.co/${model.id}/resolve/main/${nameWithoutNamespace(model.id)}-any-py3-none-any.whl
|
363 |
|
@@ -661,6 +667,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
|
|
661 |
docsUrl: "https://huggingface.co/docs/hub/sentence-transformers",
|
662 |
snippets: sentenceTransformers,
|
663 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
sklearn: {
|
665 |
btnLabel: "Scikit-learn",
|
666 |
repoName: "Scikit-learn",
|
|
|
358 |
model = SentenceTransformer("${model.id}")`,
|
359 |
];
|
360 |
|
361 |
+
const setfit = (model: ModelData) => [
|
362 |
+
`from setfit import SetFitModel
|
363 |
+
|
364 |
+
model = SetFitModel.from_pretrained("${model.id}")`,
|
365 |
+
];
|
366 |
+
|
367 |
const spacy = (model: ModelData) => [
|
368 |
`!pip install https://huggingface.co/${model.id}/resolve/main/${nameWithoutNamespace(model.id)}-any-py3-none-any.whl
|
369 |
|
|
|
667 |
docsUrl: "https://huggingface.co/docs/hub/sentence-transformers",
|
668 |
snippets: sentenceTransformers,
|
669 |
},
|
670 |
+
setfit: {
|
671 |
+
btnLabel: "setfit",
|
672 |
+
repoName: "setfit",
|
673 |
+
repoUrl: "https://github.com/huggingface/setfit",
|
674 |
+
docsUrl: "https://huggingface.co/docs/hub/setfit",
|
675 |
+
snippets: setfit,
|
676 |
+
},
|
677 |
sklearn: {
|
678 |
btnLabel: "Scikit-learn",
|
679 |
repoName: "Scikit-learn",
|
packages/tasks/src/model-libraries.ts
CHANGED
@@ -23,6 +23,7 @@ export enum ModelLibrary {
|
|
23 |
"pyannote-audio" = "pyannote.audio",
|
24 |
"sample-factory" = "Sample Factory",
|
25 |
"sentence-transformers" = "Sentence Transformers",
|
|
|
26 |
"sklearn" = "Scikit-learn",
|
27 |
"spacy" = "spaCy",
|
28 |
"span-marker" = "SpanMarker",
|
|
|
23 |
"pyannote-audio" = "pyannote.audio",
|
24 |
"sample-factory" = "Sample Factory",
|
25 |
"sentence-transformers" = "Sentence Transformers",
|
26 |
+
"setfit" = "SetFit",
|
27 |
"sklearn" = "Scikit-learn",
|
28 |
"spacy" = "spaCy",
|
29 |
"span-marker" = "SpanMarker",
|
packages/tasks/src/tasks/index.ts
CHANGED
@@ -69,7 +69,7 @@ export const TASKS_MODEL_LIBRARIES: Record<PipelineType, ModelLibraryKey[]> = {
|
|
69 |
"tabular-classification": ["sklearn"],
|
70 |
"tabular-regression": ["sklearn"],
|
71 |
"tabular-to-text": ["transformers"],
|
72 |
-
"text-classification": ["adapter-transformers", "spacy", "transformers", "transformers.js"],
|
73 |
"text-generation": ["transformers", "transformers.js"],
|
74 |
"text-retrieval": [],
|
75 |
"text-to-image": ["diffusers"],
|
|
|
69 |
"tabular-classification": ["sklearn"],
|
70 |
"tabular-regression": ["sklearn"],
|
71 |
"tabular-to-text": ["transformers"],
|
72 |
+
"text-classification": ["adapter-transformers", "setfit", "spacy", "transformers", "transformers.js"],
|
73 |
"text-generation": ["transformers", "transformers.js"],
|
74 |
"text-retrieval": [],
|
75 |
"text-to-image": ["diffusers"],
|