import{s as Me,n as Ce,o as He}from"../chunks/scheduler.d6170356.js";import{S as Le,i as ke,g as o,s,r as A,A as Ae,h as n,f as i,c as a,j as Te,u as P,x as r,k as re,y as Pe,a as l,v as U,d as V,t as j,w as E}from"../chunks/index.fcd4cc08.js";import{C as Ue}from"../chunks/CodeBlock.7b16bdef.js";import{H as I}from"../chunks/Heading.8660bd0e.js";function Ve(de){let d,N,F,Z,c,q,p,me="<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.",z,f,S,h,ue='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>.',O,g,ce="All models on the Hub come up with the following features:",X,v,pe="<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>",Y,m,fe='<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"/>',Q,b,B,$,he='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>.',D,y,ge="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.",R,w,W,_,ve="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!",J,u,be='<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"/>',K,x,ee,T,$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>.',te,M,ye="All the recipes create all the needed files to upload a model to the Hub. The process usually involves the following steps:",ie,C,we="<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>",le,H,_e="Once you do this, you can try out your model directly in the browser and share it with the rest of the community.",se,L,ae,k,xe='<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>',oe,G,ne;return c=new I({props:{title:"Using Asteroid at Hugging Face",local:"using-asteroid-at-hugging-face",headingTag:"h1"}}),f=new I({props:{title:"Exploring Asteroid in the Hub",local:"exploring-asteroid-in-the-hub",headingTag:"h2"}}),b=new I({props:{title:"Using existing models",local:"using-existing-models",headingTag:"h2"}}),w=new Ue({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}}),x=new I({props:{title:"Sharing your models",local:"sharing-your-models",headingTag:"h2"}}),L=new I({props:{title:"Additional resources",local:"additional-resources",headingTag:"h2"}}),{c(){d=o("meta"),N=s(),F=o("p"),Z=s(),A(c.$$.fragment),q=s(),p=o("p"),p.innerHTML=me,z=s(),A(f.$$.fragment),S=s(),h=o("p"),h.innerHTML=ue,O=s(),g=o("p"),g.textContent=ce,X=s(),v=o("ol"),v.innerHTML=pe,Y=s(),m=o("div"),m.innerHTML=fe,Q=s(),A(b.$$.fragment),B=s(),$=o("p"),$.innerHTML=he,D=s(),y=o("p"),y.innerHTML=ge,R=s(),A(w.$$.fragment),W=s(),_=o("p"),_.innerHTML=ve,J=s(),u=o("div"),u.innerHTML=be,K=s(),A(x.$$.fragment),ee=s(),T=o("p"),T.innerHTML=$e,te=s(),M=o("p"),M.textContent=ye,ie=s(),C=o("ol"),C.innerHTML=we,le=s(),H=o("p"),H.textContent=_e,se=s(),A(L.$$.fragment),ae=s(),k=o("ul"),k.innerHTML=xe,oe=s(),G=o("p"),this.h()},l(e){const t=Ae("svelte-u9bgzb",document.head);d=n(t,"META",{name:!0,content:!0}),t.forEach(i),N=a(e),F=n(e,"P",{}),Te(F).forEach(i),Z=a(e),P(c.$$.fragment,e),q=a(e),p=n(e,"P",{"data-svelte-h":!0}),r(p)!=="svelte-1qjlbp6"&&(p.innerHTML=me),z=a(e),P(f.$$.fragment,e),S=a(e),h=n(e,"P",{"data-svelte-h":!0}),r(h)!=="svelte-1ub76b"&&(h.innerHTML=ue),O=a(e),g=n(e,"P",{"data-svelte-h":!0}),r(g)!=="svelte-t2majo"&&(g.textContent=ce),X=a(e),v=n(e,"OL",{"data-svelte-h":!0}),r(v)!=="svelte-rcdzi9"&&(v.innerHTML=pe),Y=a(e),m=n(e,"DIV",{class:!0,"data-svelte-h":!0}),r(m)!=="svelte-435q1z"&&(m.innerHTML=fe),Q=a(e),P(b.$$.fragment,e),B=a(e),$=n(e,"P",{"data-svelte-h":!0}),r($)!=="svelte-ofs9i1"&&($.innerHTML=he),D=a(e),y=n(e,"P",{"data-svelte-h":!0}),r(y)!=="svelte-1nqrvc0"&&(y.innerHTML=ge),R=a(e),P(w.$$.fragment,e),W=a(e),_=n(e,"P",{"data-svelte-h":!0}),r(_)!=="svelte-1tjoh4p"&&(_.innerHTML=ve),J=a(e),u=n(e,"DIV",{class:!0,"data-svelte-h":!0}),r(u)!=="svelte-125odup"&&(u.innerHTML=be),K=a(e),P(x.$$.fragment,e),ee=a(e),T=n(e,"P",{"data-svelte-h":!0}),r(T)!=="svelte-mr4xsw"&&(T.innerHTML=$e),te=a(e),M=n(e,"P",{"data-svelte-h":!0}),r(M)!=="svelte-1y63q62"&&(M.textContent=ye),ie=a(e),C=n(e,"OL",{"data-svelte-h":!0}),r(C)!=="svelte-equ67y"&&(C.innerHTML=we),le=a(e),H=n(e,"P",{"data-svelte-h":!0}),r(H)!=="svelte-14zae00"&&(H.textContent=_e),se=a(e),P(L.$$.fragment,e),ae=a(e),k=n(e,"UL",{"data-svelte-h":!0}),r(k)!=="svelte-sfho8j"&&(k.innerHTML=xe),oe=a(e),G=n(e,"P",{}),Te(G).forEach(i),this.h()},h(){re(d,"name","hf:doc:metadata"),re(d,"content",je),re(m,"class","flex justify-center"),re(u,"class","flex justify-center")},m(e,t){Pe(document.head,d),l(e,N,t),l(e,F,t),l(e,Z,t),U(c,e,t),l(e,q,t),l(e,p,t),l(e,z,t),U(f,e,t),l(e,S,t),l(e,h,t),l(e,O,t),l(e,g,t),l(e,X,t),l(e,v,t),l(e,Y,t),l(e,m,t),l(e,Q,t),U(b,e,t),l(e,B,t),l(e,$,t),l(e,D,t),l(e,y,t),l(e,R,t),U(w,e,t),l(e,W,t),l(e,_,t),l(e,J,t),l(e,u,t),l(e,K,t),U(x,e,t),l(e,ee,t),l(e,T,t),l(e,te,t),l(e,M,t),l(e,ie,t),l(e,C,t),l(e,le,t),l(e,H,t),l(e,se,t),U(L,e,t),l(e,ae,t),l(e,k,t),l(e,oe,t),l(e,G,t),ne=!0},p:Ce,i(e){ne||(V(c.$$.fragment,e),V(f.$$.fragment,e),V(b.$$.fragment,e),V(w.$$.fragment,e),V(x.$$.fragment,e),V(L.$$.fragment,e),ne=!0)},o(e){j(c.$$.fragment,e),j(f.$$.fragment,e),j(b.$$.fragment,e),j(w.$$.fragment,e),j(x.$$.fragment,e),j(L.$$.fragment,e),ne=!1},d(e){e&&(i(N),i(F),i(Z),i(q),i(p),i(z),i(S),i(h),i(O),i(g),i(X),i(v),i(Y),i(m),i(Q),i(B),i($),i(D),i(y),i(R),i(W),i(_),i(J),i(u),i(K),i(ee),i(T),i(te),i(M),i(ie),i(C),i(le),i(H),i(se),i(ae),i(k),i(oe),i(G)),i(d),E(c,e),E(f,e),E(b,e),E(w,e),E(x,e),E(L,e)}}}const je='{"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 Ee(de){return He(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ze extends Le{constructor(d){super(),ke(this,d,Ee,Ve,Me,{})}}export{Ze as component};
