import{s as ke,n as Ae,o as Pe}from"../chunks/scheduler.9cda857a.js";import{S as Ue,i as Ee,e as n,s,c as p,h as Ve,a as o,d as i,b as a,f as Le,g as f,j as r,k as pe,l as je,m as l,n as c,t as h,o as g,p as $}from"../chunks/index.003612b0.js";import{C as Ge}from"../chunks/CopyLLMTxtMenu.44d08a39.js";import{C as ze}from"../chunks/CodeBlock.a90632f1.js";import{H as N,E as Fe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.e5cfda8c.js";function Ie(fe){let d,Z,F,q,b,S,v,O,y,ce="<code>asteroid</code> is a Pytorch toolkit for audio source separation. It enables fast experimentation on common datasets with support for a large range of datasets and recipes to reproduce papers.",X,w,Y,x,he='You can find <code>asteroid</code> models by filtering at the left of the <a href="https://huggingface.co/models?filter=asteroid" rel="nofollow">models page</a>.',Q,_,ge="All models on the Hub come up with the following features:",B,M,$e="<li>An automatically generated model card with a description, training configuration, metrics, and more.</li> <li>Metadata tags that help for discoverability and contain information such as licenses and datasets.</li> <li>An interactive widget you can use to play out with the model directly in the browser.</li> <li>An Inference API that allows to make inference requests.</li>",D,m,be='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-transformers_widget.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-transformers_widget-dark.png"/>',R,T,W,C,ve='For a full guide on loading pre-trained models, we recommend checking out the <a href="https://github.com/asteroid-team/asteroid/blob/master/docs/source/readmes/pretrained_models.md" rel="nofollow">official guide</a>.',J,H,ye="All model classes (<code>BaseModel</code>, <code>ConvTasNet</code>, etc) have a <code>from_pretrained</code> method that allows to load models from the Hub.",K,L,ee,k,we="If you want to see how to load a specific model, you can click <code>Use in Adapter Transformers</code> and you will be given a working snippet that you can load it!",te,u,xe='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-transformers_snippet.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-transformers_snippet-dark.png"/>',ie,A,le,P,_e='At the moment there is no automatic method to upload your models to the Hub, but the process to upload them is documented in the <a href="https://github.com/asteroid-team/asteroid/blob/master/docs/source/readmes/pretrained_models.md#share-your-models" rel="nofollow">official guide</a>.',se,U,Me="All the recipes create all the needed files to upload a model to the Hub. The process usually involves the following steps:",ae,E,Te="<li>Create and clone a model repository.</li> <li>Moving files from the recipe output to the repository (model card, model filte, TensorBoard traces).</li> <li>Push the files (<code>git add</code> + <code>git commit</code> + <code>git push</code>).</li>",ne,V,Ce="Once you do this, you can try out your model directly in the browser and share it with the rest of the community.",oe,j,re,G,He='<li>Asteroid <a href="https://asteroid-team.github.io/" rel="nofollow">website</a>.</li> <li>Asteroid <a href="https://github.com/asteroid-team/asteroid" rel="nofollow">library</a>.</li> <li>Integration <a href="https://github.com/asteroid-team/asteroid/blob/master/docs/source/readmes/pretrained_models.md" rel="nofollow">docs</a>.</li>',de,z,me,I,ue;return b=new Ge({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),v=new N({props:{title:"Using Asteroid at Hugging Face",local:"using-asteroid-at-hugging-face",headingTag:"h1"}}),w=new N({props:{title:"Exploring Asteroid in the Hub",local:"exploring-asteroid-in-the-hub",headingTag:"h2"}}),T=new N({props:{title:"Using existing models",local:"using-existing-models",headingTag:"h2"}}),L=new ze({props:{code:"ZnJvbSUyMGFzdGVyb2lkLm1vZGVscyUyMGltcG9ydCUyMENvbnZUYXNOZXQlMEFtb2RlbCUyMCUzRCUyMENvbnZUYXNOZXQuZnJvbV9wcmV0cmFpbmVkKCdtcGFyaWVudGUlMkZDb252VGFzTmV0X1dIQU1fc2VwY2xlYW4nKQ==",highlighted:`<span class="hljs-keyword">from</span> asteroid.models <span class="hljs-keyword">import</span> ConvTasNet
model = ConvTasNet.from_pretrained(<span class="hljs-string">&#x27;mpariente/ConvTasNet_WHAM_sepclean&#x27;</span>)`,wrap:!1}}),A=new N({props:{title:"Sharing your models",local:"sharing-your-models",headingTag:"h2"}}),j=new N({props:{title:"Additional resources",local:"additional-resources",headingTag:"h2"}}),z=new Fe({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/asteroid.md"}}),{c(){d=n("meta"),Z=s(),F=n("p"),q=s(),p(b.$$.fragment),S=s(),p(v.$$.fragment),O=s(),y=n("p"),y.innerHTML=ce,X=s(),p(w.$$.fragment),Y=s(),x=n("p"),x.innerHTML=he,Q=s(),_=n("p"),_.textContent=ge,B=s(),M=n("ol"),M.innerHTML=$e,D=s(),m=n("div"),m.innerHTML=be,R=s(),p(T.$$.fragment),W=s(),C=n("p"),C.innerHTML=ve,J=s(),H=n("p"),H.innerHTML=ye,K=s(),p(L.$$.fragment),ee=s(),k=n("p"),k.innerHTML=we,te=s(),u=n("div"),u.innerHTML=xe,ie=s(),p(A.$$.fragment),le=s(),P=n("p"),P.innerHTML=_e,se=s(),U=n("p"),U.textContent=Me,ae=s(),E=n("ol"),E.innerHTML=Te,ne=s(),V=n("p"),V.textContent=Ce,oe=s(),p(j.$$.fragment),re=s(),G=n("ul"),G.innerHTML=He,de=s(),p(z.$$.fragment),me=s(),I=n("p"),this.h()},l(e){const t=Ve("svelte-u9bgzb",document.head);d=o(t,"META",{name:!0,content:!0}),t.forEach(i),Z=a(e),F=o(e,"P",{}),Le(F).forEach(i),q=a(e),f(b.$$.fragment,e),S=a(e),f(v.$$.fragment,e),O=a(e),y=o(e,"P",{"data-svelte-h":!0}),r(y)!=="svelte-1qjlbp6"&&(y.innerHTML=ce),X=a(e),f(w.$$.fragment,e),Y=a(e),x=o(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-1ub76b"&&(x.innerHTML=he),Q=a(e),_=o(e,"P",{"data-svelte-h":!0}),r(_)!=="svelte-t2majo"&&(_.textContent=ge),B=a(e),M=o(e,"OL",{"data-svelte-h":!0}),r(M)!=="svelte-rcdzi9"&&(M.innerHTML=$e),D=a(e),m=o(e,"DIV",{class:!0,"data-svelte-h":!0}),r(m)!=="svelte-435q1z"&&(m.innerHTML=be),R=a(e),f(T.$$.fragment,e),W=a(e),C=o(e,"P",{"data-svelte-h":!0}),r(C)!=="svelte-ofs9i1"&&(C.innerHTML=ve),J=a(e),H=o(e,"P",{"data-svelte-h":!0}),r(H)!=="svelte-1nqrvc0"&&(H.innerHTML=ye),K=a(e),f(L.$$.fragment,e),ee=a(e),k=o(e,"P",{"data-svelte-h":!0}),r(k)!=="svelte-1tjoh4p"&&(k.innerHTML=we),te=a(e),u=o(e,"DIV",{class:!0,"data-svelte-h":!0}),r(u)!=="svelte-125odup"&&(u.innerHTML=xe),ie=a(e),f(A.$$.fragment,e),le=a(e),P=o(e,"P",{"data-svelte-h":!0}),r(P)!=="svelte-mr4xsw"&&(P.innerHTML=_e),se=a(e),U=o(e,"P",{"data-svelte-h":!0}),r(U)!=="svelte-1y63q62"&&(U.textContent=Me),ae=a(e),E=o(e,"OL",{"data-svelte-h":!0}),r(E)!=="svelte-equ67y"&&(E.innerHTML=Te),ne=a(e),V=o(e,"P",{"data-svelte-h":!0}),r(V)!=="svelte-14zae00"&&(V.textContent=Ce),oe=a(e),f(j.$$.fragment,e),re=a(e),G=o(e,"UL",{"data-svelte-h":!0}),r(G)!=="svelte-sfho8j"&&(G.innerHTML=He),de=a(e),f(z.$$.fragment,e),me=a(e),I=o(e,"P",{}),Le(I).forEach(i),this.h()},h(){pe(d,"name","hf:doc:metadata"),pe(d,"content",Ne),pe(m,"class","flex justify-center"),pe(u,"class","flex justify-center")},m(e,t){je(document.head,d),l(e,Z,t),l(e,F,t),l(e,q,t),c(b,e,t),l(e,S,t),c(v,e,t),l(e,O,t),l(e,y,t),l(e,X,t),c(w,e,t),l(e,Y,t),l(e,x,t),l(e,Q,t),l(e,_,t),l(e,B,t),l(e,M,t),l(e,D,t),l(e,m,t),l(e,R,t),c(T,e,t),l(e,W,t),l(e,C,t),l(e,J,t),l(e,H,t),l(e,K,t),c(L,e,t),l(e,ee,t),l(e,k,t),l(e,te,t),l(e,u,t),l(e,ie,t),c(A,e,t),l(e,le,t),l(e,P,t),l(e,se,t),l(e,U,t),l(e,ae,t),l(e,E,t),l(e,ne,t),l(e,V,t),l(e,oe,t),c(j,e,t),l(e,re,t),l(e,G,t),l(e,de,t),c(z,e,t),l(e,me,t),l(e,I,t),ue=!0},p:Ae,i(e){ue||(h(b.$$.fragment,e),h(v.$$.fragment,e),h(w.$$.fragment,e),h(T.$$.fragment,e),h(L.$$.fragment,e),h(A.$$.fragment,e),h(j.$$.fragment,e),h(z.$$.fragment,e),ue=!0)},o(e){g(b.$$.fragment,e),g(v.$$.fragment,e),g(w.$$.fragment,e),g(T.$$.fragment,e),g(L.$$.fragment,e),g(A.$$.fragment,e),g(j.$$.fragment,e),g(z.$$.fragment,e),ue=!1},d(e){e&&(i(Z),i(F),i(q),i(S),i(O),i(y),i(X),i(Y),i(x),i(Q),i(_),i(B),i(M),i(D),i(m),i(R),i(W),i(C),i(J),i(H),i(K),i(ee),i(k),i(te),i(u),i(ie),i(le),i(P),i(se),i(U),i(ae),i(E),i(ne),i(V),i(oe),i(re),i(G),i(de),i(me),i(I)),i(d),$(b,e),$(v,e),$(w,e),$(T,e),$(L,e),$(A,e),$(j,e),$(z,e)}}}const Ne='{"title":"Using Asteroid at Hugging Face","local":"using-asteroid-at-hugging-face","sections":[{"title":"Exploring Asteroid in the Hub","local":"exploring-asteroid-in-the-hub","sections":[],"depth":2},{"title":"Using existing models","local":"using-existing-models","sections":[],"depth":2},{"title":"Sharing your models","local":"sharing-your-models","sections":[],"depth":2},{"title":"Additional resources","local":"additional-resources","sections":[],"depth":2}],"depth":1}';function Ze(fe){return Pe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qe extends Ue{constructor(d){super(),Ee(this,d,Ze,Ie,ke,{})}}export{Qe as component};
