import{S as df,i as cf,s as yf,e as o,k as p,w as d,t as s,N as mf,c as r,d as l,m as u,a,x as c,h as i,b as f,P as Zr,G as t,g as h,y,L as wf,q as m,o as w,B as _,v as _f}from"../chunks/vendor-hf-doc-builder.js";import{I as X}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as b}from"../chunks/CodeBlock-hf-doc-builder.js";function gf(yn){let P,io,Z,ee,zt,je,Fr,Kt,Gr,no,M,Sr,Ce,xr,Br,$e,Wr,Lr,ke,Yr,Or,ho,It,qr,fo,v,el,Rr,Vr,Ae,zr,Ne,Kr,ea,ta,De,la,Qe,oa,ra,aa,tl,sa,po,Et,ia,uo,te,na,He,ha,fa,co,le,pa,Xe,ua,da,yo,F,oe,ll,Pe,ca,ol,ya,mo,C,Ze,Fe,ma,rl,wa,_a,ga,Ge,ba,G,Se,Ma,al,va,Ua,Ta,xe,Ja,Be,Ia,S,We,Ea,sl,ja,Ca,$a,Le,ka,jt,il,Aa,Na,wo,x,re,nl,Ye,Da,hl,Qa,_o,Ct,Ha,go,U,Xa,fl,Pa,Za,pl,Fa,Ga,ul,Sa,xa,bo,$,Ba,dl,Wa,La,Oe,Ya,Oa,Mo,qe,vo,k,qa,cl,Ra,Va,yl,za,Ka,Uo,$t,es,To,Re,Jo,ae,ts,ml,ls,os,Io,Ve,Eo,B,se,wl,ze,rs,_l,as,jo,kt,ss,Co,W,At,mn,is,Nt,wn,$o,A,ns,Ke,hs,fs,et,ps,us,ko,tt,Ao,Dt,ds,No,L,Qt,_n,cs,Ht,gn,Do,Y,ie,gl,lt,ys,bl,ms,Qo,ne,ws,Ml,_s,gs,Ho,he,Xt,vl,bs,Ms,vs,Pt,Ul,Us,Ts,Xo,O,fe,Tl,ot,Js,Jl,Il,Is,Po,N,Es,El,js,Cs,jl,$s,ks,Zo,rt,Fo,pe,As,Cl,Ns,Ds,Go,q,ue,$l,at,Qs,kl,Al,Hs,So,de,Xs,Nl,Ps,Zs,xo,D,Dl,Fs,Gs,Ql,Ss,xs,Hl,Bs,Bo,Zt,Ws,Wo,st,Lo,ce,Ls,R,Ys,Xl,Os,qs,Rs,Yo,Ft,Vs,Oo,ye,zs,Gt,Ks,ei,qo,V,me,Pl,it,ti,Zl,li,Ro,St,oi,Vo,z,we,Fl,nt,ri,Gl,ai,zo,_e,si,ht,ii,ni,Ko,Q,Sl,J,hi,xl,fi,pi,Bl,ui,di,Wl,ci,yi,mi,ft,Ll,wi,_i,I,Yl,pt,gi,Ol,bi,Mi,vi,ut,E,Ui,ql,Ti,Ji,dt,Ii,Ei,Rl,ji,Ci,$i,ct,ki,Vl,j,Ai,zl,Ni,Di,Kl,Qi,Hi,yt,Xi,Pi,Zi,mt,wt,Fi,eo,Gi,Si,xi,_t,Bi,gt,to,Wi,Li,bt,er,K,ge,lo,Mt,Yi,oo,Oi,tr,g,qi,vt,Ri,Vi,Ut,zi,Ki,Tt,en,tn,Jt,ln,on,lr,T,rn,ro,an,sn,ao,nn,hn,so,fn,pn,or;return je=new X({}),Pe=new X({}),Ge=new b({props:{code:"cHl0aG9uJTIwLW0lMjBwaXAlMjBpbnN0YWxsJTIwaHVnZ2luZ2ZhY2VfaHVi",highlighted:"python -m pip install huggingface_hub"}}),xe=new b({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login"}}),Be=new b({props:{code:"JTIwJTIwJTIwJTIwJTIwXyU3QyUyMCUyMCUyMCUyMF8lN0MlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3QyUyMCUyMCUyMCUyMF8lN0NfJTdDXyU3QyUyMCUyMCUyMCUyMF8lN0NfJTdDXyU3QyUyMCUyMF8lN0NfJTdDXyU3QyUyMCUyMF8lN0MlMjAlMjAlMjAlMjAlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3Q18lN0NfJTdDJTIwJTIwJTIwJTIwJTIwJTIwXyU3Q18lN0NfJTdDXyU3QyUyMCUyMCUyMCUyMF8lN0NfJTdDJTIwJTIwJTIwJTIwJTIwJTIwXyU3Q18lN0NfJTdDJTIwJTIwXyU3Q18lN0NfJTdDXyU3QyUwQSUyMCUyMCUyMCUyMCUyMF8lN0MlMjAlMjAlMjAlMjBfJTdDJTIwJTIwXyU3QyUyMCUyMCUyMCUyMF8lN0MlMjAlMjBfJTdDJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwXyU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMF8lN0MlMjAlMjAlMjAlMjBfJTdDXyU3QyUyMCUyMCUyMCUyMF8lN0MlMjAlMjBfJTdDJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwXyU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMF8lN0MlMjAlMjAlMjAlMjBfJTdDJTIwJTIwXyU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMF8lN0MlMEElMjAlMjAlMjAlMjAlMjBfJTdDXyU3Q18lN0NfJTdDJTIwJTIwXyU3QyUyMCUyMCUyMCUyMF8lN0MlMjAlMjBfJTdDJTIwJTIwXyU3Q18lN0MlMjAlMjBfJTdDJTIwJTIwXyU3Q18lN0MlMjAlMjAlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3QyUyMCUyMF8lN0MlMjAlMjBfJTdDJTIwJTIwXyU3QyUyMCUyMF8lN0NfJTdDJTIwJTIwJTIwJTIwJTIwJTIwXyU3Q18lN0NfJTdDJTIwJTIwJTIwJTIwXyU3Q18lN0NfJTdDXyU3QyUyMCUyMF8lN0MlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBfJTdDXyU3Q18lN0MlMEElMjAlMjAlMjAlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3QyUyMCUyMF8lN0MlMjAlMjAlMjAlMjBfJTdDJTIwJTIwXyU3QyUyMCUyMCUyMCUyMF8lN0MlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3QyUyMCUyMCUyMCUyMF8lN0MlMjAlMjAlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3Q18lN0MlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3QyUyMCUyMCUyMCUyMCUyMCUyMF8lN0MlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3QyUyMCUyMF8lN0MlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBfJTdDJTBBJTIwJTIwJTIwJTIwJTIwXyU3QyUyMCUyMCUyMCUyMF8lN0MlMjAlMjAlMjAlMjBfJTdDXyU3QyUyMCUyMCUyMCUyMCUyMCUyMF8lN0NfJTdDXyU3QyUyMCUyMCUyMCUyMF8lN0NfJTdDXyU3QyUyMCUyMF8lN0NfJTdDXyU3QyUyMCUyMF8lN0MlMjAlMjAlMjAlMjAlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3Q18lN0NfJTdDJTIwJTIwJTIwJTIwJTIwJTIwXyU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMF8lN0MlMjAlMjAlMjAlMjBfJTdDJTIwJTIwJTIwJTIwXyU3Q18lN0NfJTdDJTIwJTIwXyU3Q18lN0NfJTdDXyU3QyUwQSUwQSUyMCUyMCUyMCUyMCUyMCUwQVVzZXJuYW1lJTNBJTIwJTBBUGFzc3dvcmQlM0E=",highlighted:`     _|    _|  _|    _|    _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|_|_|_|    _|_|      _|_|_|  _|_|_|_|
     _|    _|  _|    _|  _|        _|          _|    _|_|    _|  _|            _|        _|    _|  _|        _|
     _|_|_|_|  _|    _|  _|  _|_|  _|  _|_|    _|    _|  _|  _|  _|  _|_|      _|_|_|    _|_|_|_|  _|        _|_|_|
     _|    _|  _|    _|  _|    _|  _|    _|    _|    _|    _|_|  _|    _|      _|        _|    _|  _|        _|
     _|    _|    _|_|      _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|        _|    _|    _|_|_|  _|_|_|_|

     
Username: 
Password:`}}),Le=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login
<span class="hljs-meta">&gt;&gt;&gt; </span>notebook_login()`}}),Ye=new X({}),qe=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQWhmX2h1Yl9kb3dubG9hZChyZXBvX2lkJTNEJTIybHlzYW5kcmUlMkZhcnhpdi1ubHAlMjIlMkMlMjBmaWxlbmFtZSUzRCUyMmNvbmZpZy5qc29uJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, filename=<span class="hljs-string">&quot;config.json&quot;</span>)`}}),Re=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQWhmX2h1Yl9kb3dubG9hZChyZXBvX2lkJTNEJTIybHlzYW5kcmUlMkZhcnhpdi1ubHAlMjIlMkMlMjBmaWxlbmFtZSUzRCUyMmNvbmZpZy5qc29uJTIyJTJDJTIwcmV2aXNpb24lM0QlMjI4NzdiODRhOGY5M2YyZDYxOWZhYTJhNmU1MTRhMzJiZWVmODhhYjBhJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, filename=<span class="hljs-string">&quot;config.json&quot;</span>, revision=<span class="hljs-string">&quot;877b84a8f93f2d619faa2a6e514a32beef88ab0a&quot;</span>)`}}),Ve=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQWhmX2h1Yl9kb3dubG9hZChyZXBvX2lkJTNEJTIybHlzYW5kcmUlMkZhcnhpdi1ubHAlMjIlMkMlMjBmaWxlbmFtZSUzRCUyMmNvbmZpZy5qc29uJTIyJTJDJTIwY2FjaGVfZGlyJTNEJTIyJTJGaG9tZSUyRmx5c2FuZHJlJTJGdGVzdCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, filename=<span class="hljs-string">&quot;config.json&quot;</span>, cache_dir=<span class="hljs-string">&quot;/home/lysandre/test&quot;</span>)`}}),ze=new X({}),tt=new b({props:{code:"Y29uc3QlMjBhc3Rlcm9pZCUyMCUzRCUyMChtb2RlbCUzQSUyME1vZGVsRGF0YSklMjAlM0QlM0UlMEElNjBmcm9tJTIwYXN0ZXJvaWQubW9kZWxzJTIwaW1wb3J0JTIwQmFzZU1vZGVsJTBBJTIwJTIwJTBBbW9kZWwlMjAlM0QlMjBCYXNlTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMiUyNCU3Qm1vZGVsLmlkJTdEJTIyKSU2MCUzQg==",highlighted:'<span class="hljs-keyword">const</span> <span class="hljs-title function_">asteroid</span> = (<span class="hljs-params">model: ModelData</span>) =&gt;\n<span class="hljs-string">`from asteroid.models import BaseModel\n  \nmodel = BaseModel.from_pretrained(&quot;<span class="hljs-subst">${model.id}</span>&quot;)`</span>;'}}),lt=new X({}),ot=new X({}),rt=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGNyZWF0ZV9yZXBvJTBBY3JlYXRlX3JlcG8ocmVwb19pZCUzRCUyMnRlc3QtbW9kZWwlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> create_repo
<span class="hljs-meta">&gt;&gt;&gt; </span>create_repo(repo_id=<span class="hljs-string">&quot;test-model&quot;</span>)
<span class="hljs-string">&#x27;https://huggingface.co/lysandre/test-model&#x27;</span>`}}),at=new X({}),st=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHVwbG9hZF9maWxlJTBBdXBsb2FkX2ZpbGUoJTBBJTIwJTIwJTIwcGF0aF9vcl9maWxlb2JqJTNEJTIyJTJGaG9tZSUyRmx5c2FuZHJlJTJGZHVtbXktdGVzdCUyRlJFQURNRS5tZCUyMiUyQyUyMCUwQSUyMCUyMCUyMHBhdGhfaW5fcmVwbyUzRCUyMlJFQURNRS5tZCUyMiUyQyUyMCUwQSUyMCUyMCUyMHJlcG9faWQlM0QlMjJseXNhbmRyZSUyRnRlc3QtbW9kZWwlMjIlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> upload_file
<span class="hljs-meta">&gt;&gt;&gt; </span>upload_file(
<span class="hljs-meta">... </span>   path_or_fileobj=<span class="hljs-string">&quot;/home/lysandre/dummy-test/README.md&quot;</span>, 
<span class="hljs-meta">... </span>   path_in_repo=<span class="hljs-string">&quot;README.md&quot;</span>, 
<span class="hljs-meta">... </span>   repo_id=<span class="hljs-string">&quot;lysandre/test-model&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-string">&#x27;https://huggingface.co/lysandre/test-model/blob/main/README.md&#x27;</span>`}}),it=new X({}),nt=new X({}),ct=new b({props:{code:"QUxMT1dFRF9UQVNLUyUzQSUyMERpY3QlNUJzdHIlMkMlMjBUeXBlJTVCUGlwZWxpbmUlNUQlNUQlMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJ0b2tlbi1jbGFzc2lmaWNhdGlvbiUyMiUzQSUyMFRva2VuQ2xhc3NpZmljYXRpb25QaXBlbGluZSUwQSU3RA==",highlighted:`ALLOWED_TASKS: <span class="hljs-type">Dict</span>[<span class="hljs-built_in">str</span>, <span class="hljs-type">Type</span>[Pipeline]] = {
    <span class="hljs-string">&quot;token-classification&quot;</span>: TokenClassificationPipeline
}`}}),_t=new b({props:{code:"VEVTVEFCTEVfTU9ERUxTJTNBJTIwRGljdCU1QnN0ciUyQ3N0ciU1RCUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMnRleHQtZ2VuZXJhdGlvbiUyMiUzQSUyMCUyMm15LWdwdDItbW9kZWwlMjIlMEElN0Q=",highlighted:`TESTABLE_MODELS: <span class="hljs-type">Dict</span>[<span class="hljs-built_in">str</span>,<span class="hljs-built_in">str</span>] = {
    <span class="hljs-string">&quot;text-generation&quot;</span>: <span class="hljs-string">&quot;my-gpt2-model&quot;</span>
}`}}),bt=new b({props:{code:"cHl0ZXN0JTIwLXN2JTIwLS1yb290ZGlyJTIwZG9ja2VyX2ltYWdlcyUyRnlvdXItYXdlc29tZS1saWJyYXJ5JTJGZG9ja2VyX2ltYWdlcyUyRnlvdXItYXdlc29tZS1saWJyYXJ5JTJG",highlighted:"pytest -sv --rootdir docker_images/your-awesome-library/docker_images/your-awesome-library/"}}),Mt=new X({}),{c(){P=o("meta"),io=p(),Z=o("h1"),ee=o("a"),zt=o("span"),d(je.$$.fragment),Fr=p(),Kt=o("span"),Gr=s("Integrate your library with the Hub"),no=p(),M=o("p"),Sr=s("The Hugging Face Hub aims to facilitate sharing machine learning models, checkpoints, and artifacts. This endeavor includes integrating the Hub into many of the amazing third-party libraries in the community. Some of the ones already integrated include "),Ce=o("a"),xr=s("spaCy"),Br=s(", "),$e=o("a"),Wr=s("AllenNLP"),Lr=s(", and "),ke=o("a"),Yr=s("timm"),Or=s(", among many others. Integration means users can download and upload files to the Hub directly from your library. We hope you will integrate your library and join us in democratizing artificial intelligence for everyone!"),ho=p(),It=o("p"),qr=s("Integrating the Hub with your library provides many benefits, including:"),fo=p(),v=o("ul"),el=o("li"),Rr=s("Free model hosting for you and your users."),Vr=p(),Ae=o("li"),zr=s("Built-in file versioning - even for huge files - made possible by "),Ne=o("a"),Kr=s("Git-LFS"),ea=s("."),ta=p(),De=o("li"),la=s("All public models are powered by the "),Qe=o("a"),oa=s("Inference API"),ra=s("."),aa=p(),tl=o("li"),sa=s("In-browser widgets allow users to interact with your hosted models directly."),po=p(),Et=o("p"),ia=s("This tutorial will help you integrate the Hub into your library so your users can benefit from all the features offered by the Hub."),uo=p(),te=o("p"),na=s("Before you begin, we recommend you create a "),He=o("a"),ha=s("Hugging Face account"),fa=s(" from which you can manage your repositories and files."),co=p(),le=o("p"),pa=s("If you need help with the integration, feel free to open an "),Xe=o("a"),ua=s("issue"),da=s(", and we would be more than happy to help you!"),yo=p(),F=o("h2"),oe=o("a"),ll=o("span"),d(Pe.$$.fragment),ca=p(),ol=o("span"),ya=s("Installation"),mo=p(),C=o("ol"),Ze=o("li"),Fe=o("p"),ma=s("Install the "),rl=o("code"),wa=s("huggingface_hub"),_a=s(" library with pip in your environment:"),ga=p(),d(Ge.$$.fragment),ba=p(),G=o("li"),Se=o("p"),Ma=s("Once you have successfully installed the "),al=o("code"),va=s("huggingface_hub"),Ua=s(" library, log in to your Hugging Face account:"),Ta=p(),d(xe.$$.fragment),Ja=p(),d(Be.$$.fragment),Ia=p(),S=o("li"),We=o("p"),Ea=s("Alternatively, if you prefer working from a Jupyter or Colaboratory notebook, login with "),sl=o("code"),ja=s("notebook_login"),Ca=s(":"),$a=p(),d(Le.$$.fragment),ka=p(),jt=o("p"),il=o("code"),Aa=s("notebook_login"),Na=s(" will launch a widget in your notebook from which you can enter your Hugging Face credentials."),wo=p(),x=o("h2"),re=o("a"),nl=o("span"),d(Ye.$$.fragment),Da=p(),hl=o("span"),Qa=s("Download files from the Hub"),_o=p(),Ct=o("p"),Ha=s("Integration allows users to download your hosted files directly from the Hub using your library."),go=p(),U=o("p"),Xa=s("Use the "),fl=o("code"),Pa=s("hf_hub_download"),Za=s(" function to retrieve a URL and download files from your repository. Downloaded files are stored in your cache: "),pl=o("code"),Fa=s("~/.cache/huggingface/hub"),Ga=s(". You don\u2019t have to re-download the file the next time you use it, and for larger files, this can save a lot of time. Furthermore, if the repository is updated with a new version of the file, "),ul=o("code"),Sa=s("huggingface_hub"),xa=s(" will automatically download the latest version and store it in the cache for you. Users don\u2019t have to worry about updating their files."),bo=p(),$=o("p"),Ba=s("For example, download the "),dl=o("code"),Wa=s("config.json"),La=s(" file from the "),Oe=o("a"),Ya=s("lysandre/arxiv-nlp"),Oa=s(" repository:"),Mo=p(),d(qe.$$.fragment),vo=p(),k=o("p"),qa=s("Download a specific version of the file by specifying the "),cl=o("code"),Ra=s("revision"),Va=s(" parameter. The "),yl=o("code"),za=s("revision"),Ka=s(" parameter can be a branch name, tag, or commit hash."),Uo=p(),$t=o("p"),es=s("The commit hash must be a full-length hash instead of the shorter 7-character commit hash:"),To=p(),d(Re.$$.fragment),Jo=p(),ae=o("p"),ts=s("Use the "),ml=o("code"),ls=s("cache_dir"),os=s(" parameter to change where a file is stored:"),Io=p(),d(Ve.$$.fragment),Eo=p(),B=o("h3"),se=o("a"),wl=o("span"),d(ze.$$.fragment),rs=p(),_l=o("span"),as=s("Code sample"),jo=p(),kt=o("p"),ss=s("We recommend adding a code snippet to explain how to use a model in your downstream library."),Co=p(),W=o("div"),At=o("img"),is=p(),Nt=o("img"),$o=p(),A=o("p"),ns=s("Add a code snippet by updating the "),Ke=o("a"),hs=s("Libraries Typescript file"),fs=s(" with instructions for your model. For example, the "),et=o("a"),ps=s("Asteroid"),us=s(" integration includes a brief code snippet for how to load and use an Asteroid model:"),ko=p(),d(tt.$$.fragment),Ao=p(),Dt=o("p"),ds=s("Doing so will also add a tag to your model so users can quickly identify models from your library."),No=p(),L=o("div"),Qt=o("img"),cs=p(),Ht=o("img"),Do=p(),Y=o("h2"),ie=o("a"),gl=o("span"),d(lt.$$.fragment),ys=p(),bl=o("span"),ms=s("Upload files to the Hub"),Qo=p(),ne=o("p"),ws=s("You might also want to provide a method for creating model repositories and uploading files to the Hub directly from your library. The "),Ml=o("code"),_s=s("huggingface_hub"),gs=s(" library offers two ways to assist you with creating repositories and uploading files:"),Ho=p(),he=o("ul"),Xt=o("li"),vl=o("code"),bs=s("create_repo"),Ms=s(" creates a repository on the Hub."),vs=p(),Pt=o("li"),Ul=o("code"),Us=s("upload_file"),Ts=s(" directly uploads files to a repository on the Hub."),Xo=p(),O=o("h3"),fe=o("a"),Tl=o("span"),d(ot.$$.fragment),Js=p(),Jl=o("span"),Il=o("code"),Is=s("create_repo"),Po=p(),N=o("p"),Es=s("The "),El=o("code"),js=s("create_repo"),Cs=s(" method creates a repository on the Hub. Use the "),jl=o("code"),$s=s("name"),ks=s(" parameter to provide a name for your repository:"),Zo=p(),d(rt.$$.fragment),Fo=p(),pe=o("p"),As=s("When you check your Hugging Face account, you should now see a "),Cl=o("code"),Ns=s("test-model"),Ds=s(" repository under your namespace."),Go=p(),q=o("h3"),ue=o("a"),$l=o("span"),d(at.$$.fragment),Qs=p(),kl=o("span"),Al=o("code"),Hs=s("upload_file"),So=p(),de=o("p"),Xs=s("The "),Nl=o("code"),Ps=s("upload_file"),Zs=s(" method uploads files to the Hub. This method requires the following:"),xo=p(),D=o("ul"),Dl=o("li"),Fs=s("A path to the file to upload."),Gs=p(),Ql=o("li"),Ss=s("The final path in the repository."),xs=p(),Hl=o("li"),Bs=s("The repository you wish to push the files to."),Bo=p(),Zt=o("p"),Ws=s("For example:"),Wo=p(),d(st.$$.fragment),Lo=p(),ce=o("p"),Ls=s("If you need to upload more than one file, look at the "),R=o("a"),Ys=s("utilities offered by the "),Xl=o("code"),Os=s("Repository"),qs=s(" class"),Rs=s("."),Yo=p(),Ft=o("p"),Vs=s("Once again, if you check your Hugging Face account, you should see the file inside your repository."),Oo=p(),ye=o("p"),zs=s("Lastly, it is important to add a model card so users understand how to use your model. See "),Gt=o("a"),Ks=s("here"),ei=s(" for more details about how to create a model card."),qo=p(),V=o("h2"),me=o("a"),Pl=o("span"),d(it.$$.fragment),ti=p(),Zl=o("span"),li=s("Set up the Inference API"),Ro=p(),St=o("p"),oi=s("Our Inference API powers models uploaded to the Hub through your library."),Vo=p(),z=o("h3"),we=o("a"),Fl=o("span"),d(nt.$$.fragment),ri=p(),Gl=o("span"),ai=s("Create an Inference API Docker image"),zo=p(),_e=o("p"),si=s("All third-party libraries are Dockerized, so you can install the dependencies you\u2019ll need for your library to work correctly. Add your library to the existing Docker images by navigating to the "),ht=o("a"),ii=s("Docker images folder"),ni=s("."),Ko=p(),Q=o("ol"),Sl=o("li"),J=o("p"),hi=s("Copy the "),xl=o("code"),fi=s("common"),pi=s(" folder and rename it with the name of your library (e.g. "),Bl=o("code"),ui=s("docker/common"),di=s(" to "),Wl=o("code"),ci=s("docker/your-awesome-library"),yi=s(")."),mi=p(),ft=o("li"),Ll=o("p"),wi=s("There are four files you need to edit:"),_i=p(),I=o("ul"),Yl=o("li"),pt=o("p"),gi=s("List the packages required for your library to work in "),Ol=o("code"),bi=s("requirements.txt"),Mi=s("."),vi=p(),ut=o("li"),E=o("p"),Ui=s("Update "),ql=o("code"),Ti=s("app/main.py"),Ji=s(" with the tasks supported by your model (see "),dt=o("a"),Ii=s("here"),Ei=s(" for a complete list of available tasks). Look out for the "),Rl=o("code"),ji=s("IMPLEMENT_THIS"),Ci=s(" flag to add your supported task."),$i=p(),d(ct.$$.fragment),ki=p(),Vl=o("li"),j=o("p"),Ai=s("For each task your library supports, modify the "),zl=o("code"),Ni=s("app/pipelines/task_name.py"),Di=s(" files accordingly. We have also added an "),Kl=o("code"),Qi=s("IMPLEMENT_THIS"),Hi=s(" flag in the pipeline files to guide you. If there isn\u2019t a pipeline that supports your task, feel free to add one. Open an "),yt=o("a"),Xi=s("issue"),Pi=s(" here, and we will be happy to help you."),Zi=p(),mt=o("li"),wt=o("p"),Fi=s("Add your model and task to the "),eo=o("code"),Gi=s("tests/test_api.py"),Si=s(" file. For example, if you have a text generation model:"),xi=p(),d(_t.$$.fragment),Bi=p(),gt=o("li"),to=o("p"),Wi=s("Finally, run the following test to ensure everything works as expected:"),Li=p(),d(bt.$$.fragment),er=p(),K=o("h3"),ge=o("a"),lo=o("span"),d(Mt.$$.fragment),Yi=p(),oo=o("span"),Oi=s("Register your libraries supported tasks on the hub"),tr=p(),g=o("p"),qi=s("To register the tasks supported by your library on the hub you\u2019ll need to add a mapping from your library name to its supported tasks in this "),vt=o("a"),Ri=s("file"),Vi=s(". This will ensure the inference API is registered for tasks supported by your model. This file is automatically generated as part of a "),Ut=o("a"),zi=s("GitHub Action"),Ki=s(" in the "),Tt=o("a"),en=s("api-inference-community repository"),tn=s(" repository. You can see an example of this "),Jt=o("a"),ln=s("here"),on=s("."),lr=p(),T=o("p"),rn=s("With these simple but powerful methods, you brought the full functionality of the Hub into your library. Users can download files stored on the Hub from your library with "),ro=o("code"),an=s("hf_hub_download"),sn=s(", create repositories with "),ao=o("code"),nn=s("create_repo"),hn=s(", and upload files with "),so=o("code"),fn=s("upload_file"),pn=s(". You also set up Inference API with your library, allowing users to interact with your models on the Hub from inside a browser."),this.h()},l(e){const n=mf('[data-svelte="svelte-1phssyn"]',document.head);P=r(n,"META",{name:!0,content:!0}),n.forEach(l),io=u(e),Z=r(e,"H1",{class:!0});var rr=a(Z);ee=r(rr,"A",{id:!0,class:!0,href:!0});var bn=a(ee);zt=r(bn,"SPAN",{});var Mn=a(zt);c(je.$$.fragment,Mn),Mn.forEach(l),bn.forEach(l),Fr=u(rr),Kt=r(rr,"SPAN",{});var vn=a(Kt);Gr=i(vn,"Integrate your library with the Hub"),vn.forEach(l),rr.forEach(l),no=u(e),M=r(e,"P",{});var be=a(M);Sr=i(be,"The Hugging Face Hub aims to facilitate sharing machine learning models, checkpoints, and artifacts. This endeavor includes integrating the Hub into many of the amazing third-party libraries in the community. Some of the ones already integrated include "),Ce=r(be,"A",{href:!0,rel:!0});var Un=a(Ce);xr=i(Un,"spaCy"),Un.forEach(l),Br=i(be,", "),$e=r(be,"A",{href:!0,rel:!0});var Tn=a($e);Wr=i(Tn,"AllenNLP"),Tn.forEach(l),Lr=i(be,", and "),ke=r(be,"A",{href:!0,rel:!0});var Jn=a(ke);Yr=i(Jn,"timm"),Jn.forEach(l),Or=i(be,", among many others. Integration means users can download and upload files to the Hub directly from your library. We hope you will integrate your library and join us in democratizing artificial intelligence for everyone!"),be.forEach(l),ho=u(e),It=r(e,"P",{});var In=a(It);qr=i(In,"Integrating the Hub with your library provides many benefits, including:"),In.forEach(l),fo=u(e),v=r(e,"UL",{});var Me=a(v);el=r(Me,"LI",{});var En=a(el);Rr=i(En,"Free model hosting for you and your users."),En.forEach(l),Vr=u(Me),Ae=r(Me,"LI",{});var ar=a(Ae);zr=i(ar,"Built-in file versioning - even for huge files - made possible by "),Ne=r(ar,"A",{href:!0,rel:!0});var jn=a(Ne);Kr=i(jn,"Git-LFS"),jn.forEach(l),ea=i(ar,"."),ar.forEach(l),ta=u(Me),De=r(Me,"LI",{});var sr=a(De);la=i(sr,"All public models are powered by the "),Qe=r(sr,"A",{href:!0,rel:!0});var Cn=a(Qe);oa=i(Cn,"Inference API"),Cn.forEach(l),ra=i(sr,"."),sr.forEach(l),aa=u(Me),tl=r(Me,"LI",{});var $n=a(tl);sa=i($n,"In-browser widgets allow users to interact with your hosted models directly."),$n.forEach(l),Me.forEach(l),po=u(e),Et=r(e,"P",{});var kn=a(Et);ia=i(kn,"This tutorial will help you integrate the Hub into your library so your users can benefit from all the features offered by the Hub."),kn.forEach(l),uo=u(e),te=r(e,"P",{});var ir=a(te);na=i(ir,"Before you begin, we recommend you create a "),He=r(ir,"A",{href:!0,rel:!0});var An=a(He);ha=i(An,"Hugging Face account"),An.forEach(l),fa=i(ir," from which you can manage your repositories and files."),ir.forEach(l),co=u(e),le=r(e,"P",{});var nr=a(le);pa=i(nr,"If you need help with the integration, feel free to open an "),Xe=r(nr,"A",{href:!0,rel:!0});var Nn=a(Xe);ua=i(Nn,"issue"),Nn.forEach(l),da=i(nr,", and we would be more than happy to help you!"),nr.forEach(l),yo=u(e),F=r(e,"H2",{class:!0});var hr=a(F);oe=r(hr,"A",{id:!0,class:!0,href:!0});var Dn=a(oe);ll=r(Dn,"SPAN",{});var Qn=a(ll);c(Pe.$$.fragment,Qn),Qn.forEach(l),Dn.forEach(l),ca=u(hr),ol=r(hr,"SPAN",{});var Hn=a(ol);ya=i(Hn,"Installation"),Hn.forEach(l),hr.forEach(l),mo=u(e),C=r(e,"OL",{});var xt=a(C);Ze=r(xt,"LI",{});var fr=a(Ze);Fe=r(fr,"P",{});var pr=a(Fe);ma=i(pr,"Install the "),rl=r(pr,"CODE",{});var Xn=a(rl);wa=i(Xn,"huggingface_hub"),Xn.forEach(l),_a=i(pr," library with pip in your environment:"),pr.forEach(l),ga=u(fr),c(Ge.$$.fragment,fr),fr.forEach(l),ba=u(xt),G=r(xt,"LI",{});var Bt=a(G);Se=r(Bt,"P",{});var ur=a(Se);Ma=i(ur,"Once you have successfully installed the "),al=r(ur,"CODE",{});var Pn=a(al);va=i(Pn,"huggingface_hub"),Pn.forEach(l),Ua=i(ur," library, log in to your Hugging Face account:"),ur.forEach(l),Ta=u(Bt),c(xe.$$.fragment,Bt),Ja=u(Bt),c(Be.$$.fragment,Bt),Bt.forEach(l),Ia=u(xt),S=r(xt,"LI",{});var Wt=a(S);We=r(Wt,"P",{});var dr=a(We);Ea=i(dr,"Alternatively, if you prefer working from a Jupyter or Colaboratory notebook, login with "),sl=r(dr,"CODE",{});var Zn=a(sl);ja=i(Zn,"notebook_login"),Zn.forEach(l),Ca=i(dr,":"),dr.forEach(l),$a=u(Wt),c(Le.$$.fragment,Wt),ka=u(Wt),jt=r(Wt,"P",{});var un=a(jt);il=r(un,"CODE",{});var Fn=a(il);Aa=i(Fn,"notebook_login"),Fn.forEach(l),Na=i(un," will launch a widget in your notebook from which you can enter your Hugging Face credentials."),un.forEach(l),Wt.forEach(l),xt.forEach(l),wo=u(e),x=r(e,"H2",{class:!0});var cr=a(x);re=r(cr,"A",{id:!0,class:!0,href:!0});var Gn=a(re);nl=r(Gn,"SPAN",{});var Sn=a(nl);c(Ye.$$.fragment,Sn),Sn.forEach(l),Gn.forEach(l),Da=u(cr),hl=r(cr,"SPAN",{});var xn=a(hl);Qa=i(xn,"Download files from the Hub"),xn.forEach(l),cr.forEach(l),_o=u(e),Ct=r(e,"P",{});var Bn=a(Ct);Ha=i(Bn,"Integration allows users to download your hosted files directly from the Hub using your library."),Bn.forEach(l),go=u(e),U=r(e,"P",{});var ve=a(U);Xa=i(ve,"Use the "),fl=r(ve,"CODE",{});var Wn=a(fl);Pa=i(Wn,"hf_hub_download"),Wn.forEach(l),Za=i(ve," function to retrieve a URL and download files from your repository. Downloaded files are stored in your cache: "),pl=r(ve,"CODE",{});var Ln=a(pl);Fa=i(Ln,"~/.cache/huggingface/hub"),Ln.forEach(l),Ga=i(ve,". You don\u2019t have to re-download the file the next time you use it, and for larger files, this can save a lot of time. Furthermore, if the repository is updated with a new version of the file, "),ul=r(ve,"CODE",{});var Yn=a(ul);Sa=i(Yn,"huggingface_hub"),Yn.forEach(l),xa=i(ve," will automatically download the latest version and store it in the cache for you. Users don\u2019t have to worry about updating their files."),ve.forEach(l),bo=u(e),$=r(e,"P",{});var Lt=a($);Ba=i(Lt,"For example, download the "),dl=r(Lt,"CODE",{});var On=a(dl);Wa=i(On,"config.json"),On.forEach(l),La=i(Lt," file from the "),Oe=r(Lt,"A",{href:!0,rel:!0});var qn=a(Oe);Ya=i(qn,"lysandre/arxiv-nlp"),qn.forEach(l),Oa=i(Lt," repository:"),Lt.forEach(l),Mo=u(e),c(qe.$$.fragment,e),vo=u(e),k=r(e,"P",{});var Yt=a(k);qa=i(Yt,"Download a specific version of the file by specifying the "),cl=r(Yt,"CODE",{});var Rn=a(cl);Ra=i(Rn,"revision"),Rn.forEach(l),Va=i(Yt," parameter. The "),yl=r(Yt,"CODE",{});var Vn=a(yl);za=i(Vn,"revision"),Vn.forEach(l),Ka=i(Yt," parameter can be a branch name, tag, or commit hash."),Yt.forEach(l),Uo=u(e),$t=r(e,"P",{});var zn=a($t);es=i(zn,"The commit hash must be a full-length hash instead of the shorter 7-character commit hash:"),zn.forEach(l),To=u(e),c(Re.$$.fragment,e),Jo=u(e),ae=r(e,"P",{});var yr=a(ae);ts=i(yr,"Use the "),ml=r(yr,"CODE",{});var Kn=a(ml);ls=i(Kn,"cache_dir"),Kn.forEach(l),os=i(yr," parameter to change where a file is stored:"),yr.forEach(l),Io=u(e),c(Ve.$$.fragment,e),Eo=u(e),B=r(e,"H3",{class:!0});var mr=a(B);se=r(mr,"A",{id:!0,class:!0,href:!0});var eh=a(se);wl=r(eh,"SPAN",{});var th=a(wl);c(ze.$$.fragment,th),th.forEach(l),eh.forEach(l),rs=u(mr),_l=r(mr,"SPAN",{});var lh=a(_l);as=i(lh,"Code sample"),lh.forEach(l),mr.forEach(l),jo=u(e),kt=r(e,"P",{});var oh=a(kt);ss=i(oh,"We recommend adding a code snippet to explain how to use a model in your downstream library."),oh.forEach(l),Co=u(e),W=r(e,"DIV",{class:!0});var wr=a(W);At=r(wr,"IMG",{class:!0,src:!0}),is=u(wr),Nt=r(wr,"IMG",{class:!0,src:!0}),wr.forEach(l),$o=u(e),A=r(e,"P",{});var Ot=a(A);ns=i(Ot,"Add a code snippet by updating the "),Ke=r(Ot,"A",{href:!0,rel:!0});var rh=a(Ke);hs=i(rh,"Libraries Typescript file"),rh.forEach(l),fs=i(Ot," with instructions for your model. For example, the "),et=r(Ot,"A",{href:!0,rel:!0});var ah=a(et);ps=i(ah,"Asteroid"),ah.forEach(l),us=i(Ot," integration includes a brief code snippet for how to load and use an Asteroid model:"),Ot.forEach(l),ko=u(e),c(tt.$$.fragment,e),Ao=u(e),Dt=r(e,"P",{});var sh=a(Dt);ds=i(sh,"Doing so will also add a tag to your model so users can quickly identify models from your library."),sh.forEach(l),No=u(e),L=r(e,"DIV",{class:!0});var _r=a(L);Qt=r(_r,"IMG",{class:!0,src:!0}),cs=u(_r),Ht=r(_r,"IMG",{class:!0,src:!0}),_r.forEach(l),Do=u(e),Y=r(e,"H2",{class:!0});var gr=a(Y);ie=r(gr,"A",{id:!0,class:!0,href:!0});var ih=a(ie);gl=r(ih,"SPAN",{});var nh=a(gl);c(lt.$$.fragment,nh),nh.forEach(l),ih.forEach(l),ys=u(gr),bl=r(gr,"SPAN",{});var hh=a(bl);ms=i(hh,"Upload files to the Hub"),hh.forEach(l),gr.forEach(l),Qo=u(e),ne=r(e,"P",{});var br=a(ne);ws=i(br,"You might also want to provide a method for creating model repositories and uploading files to the Hub directly from your library. The "),Ml=r(br,"CODE",{});var fh=a(Ml);_s=i(fh,"huggingface_hub"),fh.forEach(l),gs=i(br," library offers two ways to assist you with creating repositories and uploading files:"),br.forEach(l),Ho=u(e),he=r(e,"UL",{});var Mr=a(he);Xt=r(Mr,"LI",{});var dn=a(Xt);vl=r(dn,"CODE",{});var ph=a(vl);bs=i(ph,"create_repo"),ph.forEach(l),Ms=i(dn," creates a repository on the Hub."),dn.forEach(l),vs=u(Mr),Pt=r(Mr,"LI",{});var cn=a(Pt);Ul=r(cn,"CODE",{});var uh=a(Ul);Us=i(uh,"upload_file"),uh.forEach(l),Ts=i(cn," directly uploads files to a repository on the Hub."),cn.forEach(l),Mr.forEach(l),Xo=u(e),O=r(e,"H3",{class:!0});var vr=a(O);fe=r(vr,"A",{id:!0,class:!0,href:!0});var dh=a(fe);Tl=r(dh,"SPAN",{});var ch=a(Tl);c(ot.$$.fragment,ch),ch.forEach(l),dh.forEach(l),Js=u(vr),Jl=r(vr,"SPAN",{});var yh=a(Jl);Il=r(yh,"CODE",{});var mh=a(Il);Is=i(mh,"create_repo"),mh.forEach(l),yh.forEach(l),vr.forEach(l),Po=u(e),N=r(e,"P",{});var qt=a(N);Es=i(qt,"The "),El=r(qt,"CODE",{});var wh=a(El);js=i(wh,"create_repo"),wh.forEach(l),Cs=i(qt," method creates a repository on the Hub. Use the "),jl=r(qt,"CODE",{});var _h=a(jl);$s=i(_h,"name"),_h.forEach(l),ks=i(qt," parameter to provide a name for your repository:"),qt.forEach(l),Zo=u(e),c(rt.$$.fragment,e),Fo=u(e),pe=r(e,"P",{});var Ur=a(pe);As=i(Ur,"When you check your Hugging Face account, you should now see a "),Cl=r(Ur,"CODE",{});var gh=a(Cl);Ns=i(gh,"test-model"),gh.forEach(l),Ds=i(Ur," repository under your namespace."),Ur.forEach(l),Go=u(e),q=r(e,"H3",{class:!0});var Tr=a(q);ue=r(Tr,"A",{id:!0,class:!0,href:!0});var bh=a(ue);$l=r(bh,"SPAN",{});var Mh=a($l);c(at.$$.fragment,Mh),Mh.forEach(l),bh.forEach(l),Qs=u(Tr),kl=r(Tr,"SPAN",{});var vh=a(kl);Al=r(vh,"CODE",{});var Uh=a(Al);Hs=i(Uh,"upload_file"),Uh.forEach(l),vh.forEach(l),Tr.forEach(l),So=u(e),de=r(e,"P",{});var Jr=a(de);Xs=i(Jr,"The "),Nl=r(Jr,"CODE",{});var Th=a(Nl);Ps=i(Th,"upload_file"),Th.forEach(l),Zs=i(Jr," method uploads files to the Hub. This method requires the following:"),Jr.forEach(l),xo=u(e),D=r(e,"UL",{});var Rt=a(D);Dl=r(Rt,"LI",{});var Jh=a(Dl);Fs=i(Jh,"A path to the file to upload."),Jh.forEach(l),Gs=u(Rt),Ql=r(Rt,"LI",{});var Ih=a(Ql);Ss=i(Ih,"The final path in the repository."),Ih.forEach(l),xs=u(Rt),Hl=r(Rt,"LI",{});var Eh=a(Hl);Bs=i(Eh,"The repository you wish to push the files to."),Eh.forEach(l),Rt.forEach(l),Bo=u(e),Zt=r(e,"P",{});var jh=a(Zt);Ws=i(jh,"For example:"),jh.forEach(l),Wo=u(e),c(st.$$.fragment,e),Lo=u(e),ce=r(e,"P",{});var Ir=a(ce);Ls=i(Ir,"If you need to upload more than one file, look at the "),R=r(Ir,"A",{href:!0,rel:!0});var Er=a(R);Ys=i(Er,"utilities offered by the "),Xl=r(Er,"CODE",{});var Ch=a(Xl);Os=i(Ch,"Repository"),Ch.forEach(l),qs=i(Er," class"),Er.forEach(l),Rs=i(Ir,"."),Ir.forEach(l),Yo=u(e),Ft=r(e,"P",{});var $h=a(Ft);Vs=i($h,"Once again, if you check your Hugging Face account, you should see the file inside your repository."),$h.forEach(l),Oo=u(e),ye=r(e,"P",{});var jr=a(ye);zs=i(jr,"Lastly, it is important to add a model card so users understand how to use your model. See "),Gt=r(jr,"A",{href:!0});var kh=a(Gt);Ks=i(kh,"here"),kh.forEach(l),ei=i(jr," for more details about how to create a model card."),jr.forEach(l),qo=u(e),V=r(e,"H2",{class:!0});var Cr=a(V);me=r(Cr,"A",{id:!0,class:!0,href:!0});var Ah=a(me);Pl=r(Ah,"SPAN",{});var Nh=a(Pl);c(it.$$.fragment,Nh),Nh.forEach(l),Ah.forEach(l),ti=u(Cr),Zl=r(Cr,"SPAN",{});var Dh=a(Zl);li=i(Dh,"Set up the Inference API"),Dh.forEach(l),Cr.forEach(l),Ro=u(e),St=r(e,"P",{});var Qh=a(St);oi=i(Qh,"Our Inference API powers models uploaded to the Hub through your library."),Qh.forEach(l),Vo=u(e),z=r(e,"H3",{class:!0});var $r=a(z);we=r($r,"A",{id:!0,class:!0,href:!0});var Hh=a(we);Fl=r(Hh,"SPAN",{});var Xh=a(Fl);c(nt.$$.fragment,Xh),Xh.forEach(l),Hh.forEach(l),ri=u($r),Gl=r($r,"SPAN",{});var Ph=a(Gl);ai=i(Ph,"Create an Inference API Docker image"),Ph.forEach(l),$r.forEach(l),zo=u(e),_e=r(e,"P",{});var kr=a(_e);si=i(kr,"All third-party libraries are Dockerized, so you can install the dependencies you\u2019ll need for your library to work correctly. Add your library to the existing Docker images by navigating to the "),ht=r(kr,"A",{href:!0,rel:!0});var Zh=a(ht);ii=i(Zh,"Docker images folder"),Zh.forEach(l),ni=i(kr,"."),kr.forEach(l),Ko=u(e),Q=r(e,"OL",{});var Vt=a(Q);Sl=r(Vt,"LI",{});var Fh=a(Sl);J=r(Fh,"P",{});var Ue=a(J);hi=i(Ue,"Copy the "),xl=r(Ue,"CODE",{});var Gh=a(xl);fi=i(Gh,"common"),Gh.forEach(l),pi=i(Ue," folder and rename it with the name of your library (e.g. "),Bl=r(Ue,"CODE",{});var Sh=a(Bl);ui=i(Sh,"docker/common"),Sh.forEach(l),di=i(Ue," to "),Wl=r(Ue,"CODE",{});var xh=a(Wl);ci=i(xh,"docker/your-awesome-library"),xh.forEach(l),yi=i(Ue,")."),Ue.forEach(l),Fh.forEach(l),mi=u(Vt),ft=r(Vt,"LI",{});var Ar=a(ft);Ll=r(Ar,"P",{});var Bh=a(Ll);wi=i(Bh,"There are four files you need to edit:"),Bh.forEach(l),_i=u(Ar),I=r(Ar,"UL",{});var Te=a(I);Yl=r(Te,"LI",{});var Wh=a(Yl);pt=r(Wh,"P",{});var Nr=a(pt);gi=i(Nr,"List the packages required for your library to work in "),Ol=r(Nr,"CODE",{});var Lh=a(Ol);bi=i(Lh,"requirements.txt"),Lh.forEach(l),Mi=i(Nr,"."),Nr.forEach(l),Wh.forEach(l),vi=u(Te),ut=r(Te,"LI",{});var Dr=a(ut);E=r(Dr,"P",{});var Je=a(E);Ui=i(Je,"Update "),ql=r(Je,"CODE",{});var Yh=a(ql);Ti=i(Yh,"app/main.py"),Yh.forEach(l),Ji=i(Je," with the tasks supported by your model (see "),dt=r(Je,"A",{href:!0,rel:!0});var Oh=a(dt);Ii=i(Oh,"here"),Oh.forEach(l),Ei=i(Je," for a complete list of available tasks). Look out for the "),Rl=r(Je,"CODE",{});var qh=a(Rl);ji=i(qh,"IMPLEMENT_THIS"),qh.forEach(l),Ci=i(Je," flag to add your supported task."),Je.forEach(l),$i=u(Dr),c(ct.$$.fragment,Dr),Dr.forEach(l),ki=u(Te),Vl=r(Te,"LI",{});var Rh=a(Vl);j=r(Rh,"P",{});var Ie=a(j);Ai=i(Ie,"For each task your library supports, modify the "),zl=r(Ie,"CODE",{});var Vh=a(zl);Ni=i(Vh,"app/pipelines/task_name.py"),Vh.forEach(l),Di=i(Ie," files accordingly. We have also added an "),Kl=r(Ie,"CODE",{});var zh=a(Kl);Qi=i(zh,"IMPLEMENT_THIS"),zh.forEach(l),Hi=i(Ie," flag in the pipeline files to guide you. If there isn\u2019t a pipeline that supports your task, feel free to add one. Open an "),yt=r(Ie,"A",{href:!0,rel:!0});var Kh=a(yt);Xi=i(Kh,"issue"),Kh.forEach(l),Pi=i(Ie," here, and we will be happy to help you."),Ie.forEach(l),Rh.forEach(l),Zi=u(Te),mt=r(Te,"LI",{});var Qr=a(mt);wt=r(Qr,"P",{});var Hr=a(wt);Fi=i(Hr,"Add your model and task to the "),eo=r(Hr,"CODE",{});var ef=a(eo);Gi=i(ef,"tests/test_api.py"),ef.forEach(l),Si=i(Hr," file. For example, if you have a text generation model:"),Hr.forEach(l),xi=u(Qr),c(_t.$$.fragment,Qr),Qr.forEach(l),Te.forEach(l),Ar.forEach(l),Bi=u(Vt),gt=r(Vt,"LI",{});var Xr=a(gt);to=r(Xr,"P",{});var tf=a(to);Wi=i(tf,"Finally, run the following test to ensure everything works as expected:"),tf.forEach(l),Li=u(Xr),c(bt.$$.fragment,Xr),Xr.forEach(l),Vt.forEach(l),er=u(e),K=r(e,"H3",{class:!0});var Pr=a(K);ge=r(Pr,"A",{id:!0,class:!0,href:!0});var lf=a(ge);lo=r(lf,"SPAN",{});var of=a(lo);c(Mt.$$.fragment,of),of.forEach(l),lf.forEach(l),Yi=u(Pr),oo=r(Pr,"SPAN",{});var rf=a(oo);Oi=i(rf,"Register your libraries supported tasks on the hub"),rf.forEach(l),Pr.forEach(l),tr=u(e),g=r(e,"P",{});var H=a(g);qi=i(H,"To register the tasks supported by your library on the hub you\u2019ll need to add a mapping from your library name to its supported tasks in this "),vt=r(H,"A",{href:!0,rel:!0});var af=a(vt);Ri=i(af,"file"),af.forEach(l),Vi=i(H,". This will ensure the inference API is registered for tasks supported by your model. This file is automatically generated as part of a "),Ut=r(H,"A",{href:!0,rel:!0});var sf=a(Ut);zi=i(sf,"GitHub Action"),sf.forEach(l),Ki=i(H," in the "),Tt=r(H,"A",{href:!0,rel:!0});var nf=a(Tt);en=i(nf,"api-inference-community repository"),nf.forEach(l),tn=i(H," repository. You can see an example of this "),Jt=r(H,"A",{href:!0,rel:!0});var hf=a(Jt);ln=i(hf,"here"),hf.forEach(l),on=i(H,"."),H.forEach(l),lr=u(e),T=r(e,"P",{});var Ee=a(T);rn=i(Ee,"With these simple but powerful methods, you brought the full functionality of the Hub into your library. Users can download files stored on the Hub from your library with "),ro=r(Ee,"CODE",{});var ff=a(ro);an=i(ff,"hf_hub_download"),ff.forEach(l),sn=i(Ee,", create repositories with "),ao=r(Ee,"CODE",{});var pf=a(ao);nn=i(pf,"create_repo"),pf.forEach(l),hn=i(Ee,", and upload files with "),so=r(Ee,"CODE",{});var uf=a(so);fn=i(uf,"upload_file"),uf.forEach(l),pn=i(Ee,". You also set up Inference API with your library, allowing users to interact with your models on the Hub from inside a browser."),Ee.forEach(l),this.h()},h(){f(P,"name","hf:doc:metadata"),f(P,"content",JSON.stringify(bf)),f(ee,"id","integrate-your-library-with-the-hub"),f(ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ee,"href","#integrate-your-library-with-the-hub"),f(Z,"class","relative group"),f(Ce,"href","https://spacy.io/usage/projects#huggingface_hub"),f(Ce,"rel","nofollow"),f($e,"href","https://allennlp.org/"),f($e,"rel","nofollow"),f(ke,"href","https://rwightman.github.io/pytorch-image-models/"),f(ke,"rel","nofollow"),f(Ne,"href","https://git-lfs.github.com/"),f(Ne,"rel","nofollow"),f(Qe,"href","https://huggingface.co/docs/api-inference/index"),f(Qe,"rel","nofollow"),f(He,"href","https://huggingface.co/join"),f(He,"rel","nofollow"),f(Xe,"href","https://github.com/huggingface/huggingface_hub/issues/new/choose"),f(Xe,"rel","nofollow"),f(oe,"id","installation"),f(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(oe,"href","#installation"),f(F,"class","relative group"),f(re,"id","download-files-from-the-hub"),f(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(re,"href","#download-files-from-the-hub"),f(x,"class","relative group"),f(Oe,"href","https://huggingface.co/lysandre/arxiv-nlp"),f(Oe,"rel","nofollow"),f(se,"id","code-sample"),f(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(se,"href","#code-sample"),f(B,"class","relative group"),f(At,"class","block dark:hidden"),Zr(At.src,mn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/code_snippet.png")||f(At,"src",mn),f(Nt,"class","hidden dark:block"),Zr(Nt.src,wn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/code_snippet-dark.png")||f(Nt,"src",wn),f(W,"class","flex justify-center"),f(Ke,"href","https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Libraries.ts"),f(Ke,"rel","nofollow"),f(et,"href","https://huggingface.co/asteroid-team"),f(et,"rel","nofollow"),f(Qt,"class","block dark:hidden"),Zr(Qt.src,_n="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-tags.png")||f(Qt,"src",_n),f(Ht,"class","hidden dark:block"),Zr(Ht.src,gn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-tags-dark.png")||f(Ht,"src",gn),f(L,"class","flex justify-center"),f(ie,"id","upload-files-to-the-hub"),f(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ie,"href","#upload-files-to-the-hub"),f(Y,"class","relative group"),f(fe,"id","createrepo"),f(fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(fe,"href","#createrepo"),f(O,"class","relative group"),f(ue,"id","uploadfile"),f(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ue,"href","#uploadfile"),f(q,"class","relative group"),f(R,"href","https://huggingface.co/docs/huggingface_hub/package_reference/repository"),f(R,"rel","nofollow"),f(Gt,"href","./model-cards"),f(me,"id","set-up-the-inference-api"),f(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(me,"href","#set-up-the-inference-api"),f(V,"class","relative group"),f(we,"id","create-an-inference-api-docker-image"),f(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(we,"href","#create-an-inference-api-docker-image"),f(z,"class","relative group"),f(ht,"href","https://github.com/huggingface/api-inference-community/tree/main/docker_images"),f(ht,"rel","nofollow"),f(dt,"href","https://github.com/huggingface/api-inference-community"),f(dt,"rel","nofollow"),f(yt,"href","https://github.com/huggingface/hub-docs/issues/new"),f(yt,"rel","nofollow"),f(ge,"id","register-your-libraries-supported-tasks-on-the-hub"),f(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ge,"href","#register-your-libraries-supported-tasks-on-the-hub"),f(K,"class","relative group"),f(vt,"href","https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/LibrariesToTasks.ts"),f(vt,"rel","nofollow"),f(Ut,"href","https://github.com/huggingface/api-inference-community/actions/workflows/python-api-export-tasks.yaml"),f(Ut,"rel","nofollow"),f(Tt,"href","https://github.com/huggingface/api-inference-community"),f(Tt,"rel","nofollow"),f(Jt,"href","https://github.com/huggingface/api-inference-community/actions/runs/5126874210/jobs/9221890853#step:5:8"),f(Jt,"rel","nofollow")},m(e,n){t(document.head,P),h(e,io,n),h(e,Z,n),t(Z,ee),t(ee,zt),y(je,zt,null),t(Z,Fr),t(Z,Kt),t(Kt,Gr),h(e,no,n),h(e,M,n),t(M,Sr),t(M,Ce),t(Ce,xr),t(M,Br),t(M,$e),t($e,Wr),t(M,Lr),t(M,ke),t(ke,Yr),t(M,Or),h(e,ho,n),h(e,It,n),t(It,qr),h(e,fo,n),h(e,v,n),t(v,el),t(el,Rr),t(v,Vr),t(v,Ae),t(Ae,zr),t(Ae,Ne),t(Ne,Kr),t(Ae,ea),t(v,ta),t(v,De),t(De,la),t(De,Qe),t(Qe,oa),t(De,ra),t(v,aa),t(v,tl),t(tl,sa),h(e,po,n),h(e,Et,n),t(Et,ia),h(e,uo,n),h(e,te,n),t(te,na),t(te,He),t(He,ha),t(te,fa),h(e,co,n),h(e,le,n),t(le,pa),t(le,Xe),t(Xe,ua),t(le,da),h(e,yo,n),h(e,F,n),t(F,oe),t(oe,ll),y(Pe,ll,null),t(F,ca),t(F,ol),t(ol,ya),h(e,mo,n),h(e,C,n),t(C,Ze),t(Ze,Fe),t(Fe,ma),t(Fe,rl),t(rl,wa),t(Fe,_a),t(Ze,ga),y(Ge,Ze,null),t(C,ba),t(C,G),t(G,Se),t(Se,Ma),t(Se,al),t(al,va),t(Se,Ua),t(G,Ta),y(xe,G,null),t(G,Ja),y(Be,G,null),t(C,Ia),t(C,S),t(S,We),t(We,Ea),t(We,sl),t(sl,ja),t(We,Ca),t(S,$a),y(Le,S,null),t(S,ka),t(S,jt),t(jt,il),t(il,Aa),t(jt,Na),h(e,wo,n),h(e,x,n),t(x,re),t(re,nl),y(Ye,nl,null),t(x,Da),t(x,hl),t(hl,Qa),h(e,_o,n),h(e,Ct,n),t(Ct,Ha),h(e,go,n),h(e,U,n),t(U,Xa),t(U,fl),t(fl,Pa),t(U,Za),t(U,pl),t(pl,Fa),t(U,Ga),t(U,ul),t(ul,Sa),t(U,xa),h(e,bo,n),h(e,$,n),t($,Ba),t($,dl),t(dl,Wa),t($,La),t($,Oe),t(Oe,Ya),t($,Oa),h(e,Mo,n),y(qe,e,n),h(e,vo,n),h(e,k,n),t(k,qa),t(k,cl),t(cl,Ra),t(k,Va),t(k,yl),t(yl,za),t(k,Ka),h(e,Uo,n),h(e,$t,n),t($t,es),h(e,To,n),y(Re,e,n),h(e,Jo,n),h(e,ae,n),t(ae,ts),t(ae,ml),t(ml,ls),t(ae,os),h(e,Io,n),y(Ve,e,n),h(e,Eo,n),h(e,B,n),t(B,se),t(se,wl),y(ze,wl,null),t(B,rs),t(B,_l),t(_l,as),h(e,jo,n),h(e,kt,n),t(kt,ss),h(e,Co,n),h(e,W,n),t(W,At),t(W,is),t(W,Nt),h(e,$o,n),h(e,A,n),t(A,ns),t(A,Ke),t(Ke,hs),t(A,fs),t(A,et),t(et,ps),t(A,us),h(e,ko,n),y(tt,e,n),h(e,Ao,n),h(e,Dt,n),t(Dt,ds),h(e,No,n),h(e,L,n),t(L,Qt),t(L,cs),t(L,Ht),h(e,Do,n),h(e,Y,n),t(Y,ie),t(ie,gl),y(lt,gl,null),t(Y,ys),t(Y,bl),t(bl,ms),h(e,Qo,n),h(e,ne,n),t(ne,ws),t(ne,Ml),t(Ml,_s),t(ne,gs),h(e,Ho,n),h(e,he,n),t(he,Xt),t(Xt,vl),t(vl,bs),t(Xt,Ms),t(he,vs),t(he,Pt),t(Pt,Ul),t(Ul,Us),t(Pt,Ts),h(e,Xo,n),h(e,O,n),t(O,fe),t(fe,Tl),y(ot,Tl,null),t(O,Js),t(O,Jl),t(Jl,Il),t(Il,Is),h(e,Po,n),h(e,N,n),t(N,Es),t(N,El),t(El,js),t(N,Cs),t(N,jl),t(jl,$s),t(N,ks),h(e,Zo,n),y(rt,e,n),h(e,Fo,n),h(e,pe,n),t(pe,As),t(pe,Cl),t(Cl,Ns),t(pe,Ds),h(e,Go,n),h(e,q,n),t(q,ue),t(ue,$l),y(at,$l,null),t(q,Qs),t(q,kl),t(kl,Al),t(Al,Hs),h(e,So,n),h(e,de,n),t(de,Xs),t(de,Nl),t(Nl,Ps),t(de,Zs),h(e,xo,n),h(e,D,n),t(D,Dl),t(Dl,Fs),t(D,Gs),t(D,Ql),t(Ql,Ss),t(D,xs),t(D,Hl),t(Hl,Bs),h(e,Bo,n),h(e,Zt,n),t(Zt,Ws),h(e,Wo,n),y(st,e,n),h(e,Lo,n),h(e,ce,n),t(ce,Ls),t(ce,R),t(R,Ys),t(R,Xl),t(Xl,Os),t(R,qs),t(ce,Rs),h(e,Yo,n),h(e,Ft,n),t(Ft,Vs),h(e,Oo,n),h(e,ye,n),t(ye,zs),t(ye,Gt),t(Gt,Ks),t(ye,ei),h(e,qo,n),h(e,V,n),t(V,me),t(me,Pl),y(it,Pl,null),t(V,ti),t(V,Zl),t(Zl,li),h(e,Ro,n),h(e,St,n),t(St,oi),h(e,Vo,n),h(e,z,n),t(z,we),t(we,Fl),y(nt,Fl,null),t(z,ri),t(z,Gl),t(Gl,ai),h(e,zo,n),h(e,_e,n),t(_e,si),t(_e,ht),t(ht,ii),t(_e,ni),h(e,Ko,n),h(e,Q,n),t(Q,Sl),t(Sl,J),t(J,hi),t(J,xl),t(xl,fi),t(J,pi),t(J,Bl),t(Bl,ui),t(J,di),t(J,Wl),t(Wl,ci),t(J,yi),t(Q,mi),t(Q,ft),t(ft,Ll),t(Ll,wi),t(ft,_i),t(ft,I),t(I,Yl),t(Yl,pt),t(pt,gi),t(pt,Ol),t(Ol,bi),t(pt,Mi),t(I,vi),t(I,ut),t(ut,E),t(E,Ui),t(E,ql),t(ql,Ti),t(E,Ji),t(E,dt),t(dt,Ii),t(E,Ei),t(E,Rl),t(Rl,ji),t(E,Ci),t(ut,$i),y(ct,ut,null),t(I,ki),t(I,Vl),t(Vl,j),t(j,Ai),t(j,zl),t(zl,Ni),t(j,Di),t(j,Kl),t(Kl,Qi),t(j,Hi),t(j,yt),t(yt,Xi),t(j,Pi),t(I,Zi),t(I,mt),t(mt,wt),t(wt,Fi),t(wt,eo),t(eo,Gi),t(wt,Si),t(mt,xi),y(_t,mt,null),t(Q,Bi),t(Q,gt),t(gt,to),t(to,Wi),t(gt,Li),y(bt,gt,null),h(e,er,n),h(e,K,n),t(K,ge),t(ge,lo),y(Mt,lo,null),t(K,Yi),t(K,oo),t(oo,Oi),h(e,tr,n),h(e,g,n),t(g,qi),t(g,vt),t(vt,Ri),t(g,Vi),t(g,Ut),t(Ut,zi),t(g,Ki),t(g,Tt),t(Tt,en),t(g,tn),t(g,Jt),t(Jt,ln),t(g,on),h(e,lr,n),h(e,T,n),t(T,rn),t(T,ro),t(ro,an),t(T,sn),t(T,ao),t(ao,nn),t(T,hn),t(T,so),t(so,fn),t(T,pn),or=!0},p:wf,i(e){or||(m(je.$$.fragment,e),m(Pe.$$.fragment,e),m(Ge.$$.fragment,e),m(xe.$$.fragment,e),m(Be.$$.fragment,e),m(Le.$$.fragment,e),m(Ye.$$.fragment,e),m(qe.$$.fragment,e),m(Re.$$.fragment,e),m(Ve.$$.fragment,e),m(ze.$$.fragment,e),m(tt.$$.fragment,e),m(lt.$$.fragment,e),m(ot.$$.fragment,e),m(rt.$$.fragment,e),m(at.$$.fragment,e),m(st.$$.fragment,e),m(it.$$.fragment,e),m(nt.$$.fragment,e),m(ct.$$.fragment,e),m(_t.$$.fragment,e),m(bt.$$.fragment,e),m(Mt.$$.fragment,e),or=!0)},o(e){w(je.$$.fragment,e),w(Pe.$$.fragment,e),w(Ge.$$.fragment,e),w(xe.$$.fragment,e),w(Be.$$.fragment,e),w(Le.$$.fragment,e),w(Ye.$$.fragment,e),w(qe.$$.fragment,e),w(Re.$$.fragment,e),w(Ve.$$.fragment,e),w(ze.$$.fragment,e),w(tt.$$.fragment,e),w(lt.$$.fragment,e),w(ot.$$.fragment,e),w(rt.$$.fragment,e),w(at.$$.fragment,e),w(st.$$.fragment,e),w(it.$$.fragment,e),w(nt.$$.fragment,e),w(ct.$$.fragment,e),w(_t.$$.fragment,e),w(bt.$$.fragment,e),w(Mt.$$.fragment,e),or=!1},d(e){l(P),e&&l(io),e&&l(Z),_(je),e&&l(no),e&&l(M),e&&l(ho),e&&l(It),e&&l(fo),e&&l(v),e&&l(po),e&&l(Et),e&&l(uo),e&&l(te),e&&l(co),e&&l(le),e&&l(yo),e&&l(F),_(Pe),e&&l(mo),e&&l(C),_(Ge),_(xe),_(Be),_(Le),e&&l(wo),e&&l(x),_(Ye),e&&l(_o),e&&l(Ct),e&&l(go),e&&l(U),e&&l(bo),e&&l($),e&&l(Mo),_(qe,e),e&&l(vo),e&&l(k),e&&l(Uo),e&&l($t),e&&l(To),_(Re,e),e&&l(Jo),e&&l(ae),e&&l(Io),_(Ve,e),e&&l(Eo),e&&l(B),_(ze),e&&l(jo),e&&l(kt),e&&l(Co),e&&l(W),e&&l($o),e&&l(A),e&&l(ko),_(tt,e),e&&l(Ao),e&&l(Dt),e&&l(No),e&&l(L),e&&l(Do),e&&l(Y),_(lt),e&&l(Qo),e&&l(ne),e&&l(Ho),e&&l(he),e&&l(Xo),e&&l(O),_(ot),e&&l(Po),e&&l(N),e&&l(Zo),_(rt,e),e&&l(Fo),e&&l(pe),e&&l(Go),e&&l(q),_(at),e&&l(So),e&&l(de),e&&l(xo),e&&l(D),e&&l(Bo),e&&l(Zt),e&&l(Wo),_(st,e),e&&l(Lo),e&&l(ce),e&&l(Yo),e&&l(Ft),e&&l(Oo),e&&l(ye),e&&l(qo),e&&l(V),_(it),e&&l(Ro),e&&l(St),e&&l(Vo),e&&l(z),_(nt),e&&l(zo),e&&l(_e),e&&l(Ko),e&&l(Q),_(ct),_(_t),_(bt),e&&l(er),e&&l(K),_(Mt),e&&l(tr),e&&l(g),e&&l(lr),e&&l(T)}}}const bf={local:"integrate-your-library-with-the-hub",sections:[{local:"installation",title:"Installation"},{local:"download-files-from-the-hub",sections:[{local:"code-sample",title:"Code sample"}],title:"Download files from the Hub"},{local:"upload-files-to-the-hub",sections:[{local:"createrepo",title:"`create_repo`"},{local:"uploadfile",title:"`upload_file`"}],title:"Upload files to the Hub"},{local:"set-up-the-inference-api",sections:[{local:"create-an-inference-api-docker-image",title:"Create an Inference API Docker image "},{local:"register-your-libraries-supported-tasks-on-the-hub",title:"Register your libraries supported tasks on the hub"}],title:"Set up the Inference API"}],title:"Integrate your library with the Hub"};function Mf(yn){return _f(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jf extends df{constructor(P){super();cf(this,P,Mf,gf,yf,{})}}export{Jf as default,bf as metadata};
