Skip to content

Commit

Permalink
Add docsUrl attribute to interface LibraryUiElement (#1015)
Browse files Browse the repository at this point in the history
* Add docsUrl attribute to `interface LibraryUiElement`

* add docsUrl to fastText

* some libs dont have hub docs
  • Loading branch information
mishig25 authored Oct 13, 2023
1 parent 15add79 commit 4bc8d98
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions js/src/lib/interfaces/Libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export interface LibraryUiElement {
* URL to library's repo
*/
repoUrl: string;
/**
* URL to library's docs
*/
docsUrl?: string;
/**
* Code snippet displayed on model page
*/
Expand Down Expand Up @@ -610,18 +614,21 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
btnLabel: "Adapter Transformers",
repoName: "adapter-transformers",
repoUrl: "https://github.com/Adapter-Hub/adapter-transformers",
docsUrl: "https://huggingface.co/docs/hub/adapter-transformers",
snippets: adapter_transformers,
},
"allennlp": {
btnLabel: "AllenNLP",
repoName: "AllenNLP",
repoUrl: "https://github.com/allenai/allennlp",
docsUrl: "https://huggingface.co/docs/hub/allennlp",
snippets: allennlp,
},
"asteroid": {
btnLabel: "Asteroid",
repoName: "Asteroid",
repoUrl: "https://github.com/asteroid-team/asteroid",
docsUrl: "https://huggingface.co/docs/hub/asteroid",
snippets: asteroid,
},
"bertopic": {
Expand All @@ -634,12 +641,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
btnLabel: "Diffusers",
repoName: "🤗/diffusers",
repoUrl: "https://github.com/huggingface/diffusers",
docsUrl: "https://huggingface.co/docs/hub/diffusers",
snippets: diffusers,
},
"espnet": {
btnLabel: "ESPnet",
repoName: "ESPnet",
repoUrl: "https://github.com/espnet/espnet",
docsUrl: "https://huggingface.co/docs/hub/espnet",
snippets: espnet,
},
"fairseq": {
Expand All @@ -658,6 +667,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
btnLabel: "Keras",
repoName: "Keras",
repoUrl: "https://github.com/keras-team/keras",
docsUrl: "https://huggingface.co/docs/hub/keras",
snippets: keras,
},
"nemo": {
Expand All @@ -676,6 +686,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
btnLabel: "paddlenlp",
repoName: "PaddleNLP",
repoUrl: "https://github.com/PaddlePaddle/PaddleNLP",
docsUrl: "https://huggingface.co/docs/hub/paddlenlp",
snippets: paddlenlp,
},
"peft": {
Expand All @@ -694,6 +705,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
btnLabel: "sentence-transformers",
repoName: "sentence-transformers",
repoUrl: "https://github.com/UKPLab/sentence-transformers",
docsUrl: "https://huggingface.co/docs/hub/sentence-transformers",
snippets: sentenceTransformers,
},
"sklearn": {
Expand All @@ -706,30 +718,35 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
btnLabel: "fastai",
repoName: "fastai",
repoUrl: "https://github.com/fastai/fastai",
docsUrl: "https://huggingface.co/docs/hub/fastai",
snippets: fastai,
},
"spacy": {
btnLabel: "spaCy",
repoName: "spaCy",
repoUrl: "https://github.com/explosion/spaCy",
docsUrl: "https://huggingface.co/docs/hub/spacy",
snippets: spacy,
},
"span-marker": {
btnLabel: "SpanMarker",
repoName: "SpanMarkerNER",
repoUrl: "https://github.com/tomaarsen/SpanMarkerNER",
docsUrl: "https://huggingface.co/docs/hub/span_marker",
snippets: span_marker,
},
"speechbrain": {
btnLabel: "speechbrain",
repoName: "speechbrain",
repoUrl: "https://github.com/speechbrain/speechbrain",
docsUrl: "https://huggingface.co/docs/hub/speechbrain",
snippets: speechbrain,
},
"stanza": {
btnLabel: "Stanza",
repoName: "stanza",
repoUrl: "https://github.com/stanfordnlp/stanza",
docsUrl: "https://huggingface.co/docs/hub/stanza",
snippets: stanza,
},
"tensorflowtts": {
Expand All @@ -742,18 +759,21 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
btnLabel: "timm",
repoName: "pytorch-image-models",
repoUrl: "https://github.com/rwightman/pytorch-image-models",
docsUrl: "https://huggingface.co/docs/hub/timm",
snippets: timm,
},
"transformers": {
btnLabel: "Transformers",
repoName: "🤗/transformers",
repoUrl: "https://github.com/huggingface/transformers",
docsUrl: "https://huggingface.co/docs/hub/transformers",
snippets: transformers,
},
"transformers.js": {
btnLabel: "Transformers.js",
repoName: "transformers.js",
repoUrl: "https://github.com/xenova/transformers.js",
docsUrl: "https://huggingface.co/docs/hub/transformers-js",
snippets: transformersJS,
},
"fasttext": {
Expand All @@ -766,18 +786,21 @@ export const MODEL_LIBRARIES_UI_ELEMENTS: Partial<Record<ModelLibraryKey, Librar
btnLabel: "sample-factory",
repoName: "sample-factory",
repoUrl: "https://github.com/alex-petrenko/sample-factory",
docsUrl: "https://huggingface.co/docs/hub/sample-factory",
snippets: sampleFactory,
},
"stable-baselines3": {
btnLabel: "stable-baselines3",
repoName: "stable-baselines3",
repoUrl: "https://github.com/huggingface/huggingface_sb3",
docsUrl: "https://huggingface.co/docs/hub/stable-baselines3",
snippets: stableBaselines3,
},
"ml-agents": {
btnLabel: "ml-agents",
repoName: "ml-agents",
repoUrl: "https://github.com/huggingface/ml-agents",
docsUrl: "https://huggingface.co/docs/hub/ml-agents",
snippets: mlAgents,
},
"pythae": {
Expand Down

0 comments on commit 4bc8d98

Please sign in to comment.