import{S as Ip,i as kp,s as Sp,e as s,k as p,w as y,t as l,N as $p,c as r,d as a,m as c,a as i,x as g,h as o,b as u,P as $o,G as t,g as d,y as w,q as v,o as E,B as b,v as jp}from"../chunks/vendor-hf-doc-builder.js";import{T as jo}from"../chunks/Tip-hf-doc-builder.js";import{I as nt}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as Ct}from"../chunks/CodeBlock-hf-doc-builder.js";function Jp(R){let h;return{c(){h=l(`**IMPORTANT NOTE ABOUT DATA PERSISTENCE:**
You can use the Argilla Quickstart Space as is for initial exploration and experimentation. For **longer use in small-scale projects, activate the paid persistent storage option**. This prevents data loss during Space restarts every 24 hours. If not using persistent storage, safeguard your data with Argilla Python SDK by storing it elsewhere. In this case, we gently remind you that the responsibility for maintaining your data's safety becomes yours.`)},l(f){h=o(f,`**IMPORTANT NOTE ABOUT DATA PERSISTENCE:**
You can use the Argilla Quickstart Space as is for initial exploration and experimentation. For **longer use in small-scale projects, activate the paid persistent storage option**. This prevents data loss during Space restarts every 24 hours. If not using persistent storage, safeguard your data with Argilla Python SDK by storing it elsewhere. In this case, we gently remind you that the responsibility for maintaining your data's safety becomes yours.`)},m(f,m){d(f,h,m)},d(f){f&&a(h)}}}function Cp(R){let h;return{c(){h=l('If you want to customize the title, emojis, and colors of your space, go to "Files and Versions" and edit the metadata of your README.md file.')},l(f){h=o(f,'If you want to customize the title, emojis, and colors of your space, go to "Files and Versions" and edit the metadata of your README.md file.')},m(f,m){d(f,h,m)},d(f){f&&a(h)}}}function Up(R){let h;return{c(){h=l("For quick experimentation, you can jump directly into the next section. If you want to secure your space and for longer-term usage, setting up secret variables is recommended.")},l(f){h=o(f,"For quick experimentation, you can jump directly into the next section. If you want to secure your space and for longer-term usage, setting up secret variables is recommended.")},m(f,m){d(f,h,m)},d(f){f&&a(h)}}}function Rp(R){let h;return{c(){h=l("Argilla Datasets cannot be uploaded directly from the UI. Most Argilla users upload datasets programmatically using the argilla Python library but you can also use Argilla Data Manager, a simple Streamlit app.")},l(f){h=o(f,"Argilla Datasets cannot be uploaded directly from the UI. Most Argilla users upload datasets programmatically using the argilla Python library but you can also use Argilla Data Manager, a simple Streamlit app.")},m(f,m){d(f,h,m)},d(f){f&&a(h)}}}function Pp(R){let h,f,m,oe,Ut,Ae,Jo,Rt,Co,ul,M,Pt,Uo,Ro,Nt,Po,No,Dt,Do,Oo,Ot,Yo,Go,Yt,Zo,Bo,hl,S,Fo,Ie,Wo,Xo,ke,xo,Ho,Se,Qo,Lo,fl,se,zo,Gt,Vo,qo,ml,$e,Zt,Mn,yl,z,re,Bt,je,Ko,Ft,es,gl,dt,ts,wl,Je,Wt,Tn,vl,ie,El,T,as,Xt,ls,os,xt,ss,rs,Ht,is,ns,Qt,ds,ps,bl,Ce,Lt,An,_l,ne,Ml,P,cs,zt,us,hs,Vt,fs,ms,Tl,A,ys,qt,gs,ws,Kt,vs,Es,ea,bs,_s,ta,Ms,Ts,Al,V,de,aa,Ue,As,la,Is,Il,pe,kl,q,ce,oa,Re,ks,sa,Ss,Sl,ue,$s,ra,js,Js,$l,pt,Cs,jl,_,Us,ia,Rs,Ps,na,Ns,Ds,da,Os,Ys,pa,Gs,Zs,ca,Bs,Fs,Jl,ct,Ws,Cl,I,he,ua,Xs,xs,ha,Hs,Qs,Ls,fe,fa,zs,Vs,ma,qs,Ks,er,N,ya,tr,ar,ga,lr,or,wa,sr,rr,ir,me,va,nr,dr,Ea,pr,cr,ur,D,ba,hr,fr,_a,mr,yr,Ma,gr,wr,Ul,ut,vr,Rl,O,Y,Ta,Er,br,Aa,_r,Mr,Ia,Tr,Ar,Ir,$,Pe,kr,ka,Sr,$r,jr,Sa,Jr,Cr,$a,Ur,Rr,ja,Pr,Nr,Dr,j,Ne,Or,Ja,Yr,Gr,Zr,Ca,Br,Fr,Ua,Wr,Xr,Ra,xr,Hr,Pl,G,Qr,Pa,Lr,zr,Na,Vr,qr,Nl,Z,ht,Da,Kr,ei,ti,ft,Oa,ai,li,oi,mt,Ya,si,ri,Dl,K,ye,Ga,De,ii,Za,ni,Ol,yt,di,Yl,B,Oe,pi,Ba,ci,ui,hi,Ye,fi,Fa,mi,yi,gi,Ge,wi,Wa,vi,Ei,Gl,Ze,Xa,In,Zl,ge,Bl,gt,bi,Fl,we,k,_i,xa,Mi,Ti,Ha,Ai,Ii,Qa,ki,Si,Be,$i,ji,Ji,Fe,Ci,La,We,Ui,Ri,Wl,F,Pi,Xe,Ni,Di,za,Oi,Yi,Xl,wt,Gi,xl,J,Zi,Va,Bi,Fi,qa,Wi,Xi,Ka,xi,Hi,Hl,xe,Ql,W,Qi,el,Li,zi,He,Vi,qi,Ll,Qe,zl,ve,Ki,tl,en,tn,Vl,Le,ql,vt,an,Kl,ee,Ee,al,ze,ln,ll,on,eo,Et,sn,to,bt,rn,ao,Ve,lo,_t,nn,oo,qe,so,Mt,dn,ro,Ke,io,be,pn,et,cn,un,no,te,_e,ol,tt,hn,sl,fn,po,X,mn,at,yn,gn,lt,wn,vn,co;return Ae=new nt({}),je=new nt({}),ie=new jo({props:{$$slots:{default:[Jp]},$$scope:{ctx:R}}}),ne=new jo({props:{$$slots:{default:[Cp]},$$scope:{ctx:R}}}),Ue=new nt({}),pe=new jo({props:{$$slots:{default:[Up]},$$scope:{ctx:R}}}),Re=new nt({}),De=new nt({}),ge=new jo({props:{$$slots:{default:[Rp]},$$scope:{ctx:R}}}),xe=new Ct({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRhdGFzZXRzJTIwYXJnaWxsYQ==",highlighted:"pip install datasets argilla"}}),Qe=new Ct({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJkdmlsYXN1ZXJvJTJGYmFua2luZ19hcHAlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyKS5zaHVmZmxlKCk=",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

dataset = load_dataset(<span class="hljs-string">&quot;dvilasuero/banking_app&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>).shuffle()`}}),Le=new Ct({props:{code:"aW1wb3J0JTIwYXJnaWxsYSUyMGFzJTIwcmclMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEElMjMlMjBZb3UlMjBjYW4lMjBmaW5kJTIweW91ciUyMFNwYWNlJTIwVVJMJTIwYmVoaW5kJTIwdGhlJTIwRW1iZWQlMjB0aGlzJTIwc3BhY2UlMjBidXR0b24lMEFyZy5pbml0KCUwQSUyMCUyMCUyMCUyMGFwaV91cmwlM0QlMjIlM0NodHRwcyUzQSUyRiUyRnlvdXItZGlyZWN0LXNwYWNlLXVybC5oZi5zcGFjZSUzRSUyMiUyQyUyMCUwQSUyMCUyMCUyMCUyMGFwaV9rZXklM0QlMjJhZG1pbi5hcGlrZXklMjIlMjAlMjMlMjB0aGlzJTIwaXMlMjB0aGUlMjByZWFsJTIwQVBJJTIwa2V5JTIwZGVmYXVsdCUyMHZhbHVlJTBBKSUwQSUwQWJhbmtpbmdfZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyYXJnaWxsYSUyRmJhbmtpbmdfc2VudGltZW50X3NldGZpdCUyMiUyQyUyMHNwbGl0JTNEJTIydHJhaW4lMjIpJTBBJTBBJTIzJTIwQXJnaWxsYSUyMGV4cGVjdHMlMjBsYWJlbHMlMjBpbiUyMHRoZSUyMGFubm90YXRpb24lMjBjb2x1bW4lMEElMjMlMjBXZSUyMGluY2x1ZGUlMjBsYWJlbHMlMjBmb3IlMjBkZW1vJTIwcHVycG9zZXMlMEFiYW5raW5nX2RzJTIwJTNEJTIwYmFua2luZ19kcy5yZW5hbWVfY29sdW1uKCUyMmxhYmVsJTIyJTJDJTIwJTIyYW5ub3RhdGlvbiUyMiklMEElMEElMjMlMjBCdWlsZCUyMGFyZ2lsbGElMjBkYXRhc2V0JTIwZnJvbSUyMGRhdGFzZXRzJTBBYXJnaWxsYV9kcyUyMCUzRCUyMHJnLnJlYWRfZGF0YXNldHMoYmFua2luZ19kcyUyQyUyMHRhc2slM0QlMjJUZXh0Q2xhc3NpZmljYXRpb24lMjIpJTBBJTBBJTIzJTIwQ3JlYXRlJTIwZGF0YXNldCUwQXJnLmxvZyhhcmdpbGxhX2RzJTJDJTIwJTIyYmFua2luZ2FwcF9zZW50aW1lbnQlMjIp",highlighted:`<span class="hljs-keyword">import</span> argilla <span class="hljs-keyword">as</span> rg
<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-comment"># You can find your Space URL behind the Embed this space button</span>
rg.init(
    api_url=<span class="hljs-string">&quot;&lt;https://your-direct-space-url.hf.space&gt;&quot;</span>, 
    api_key=<span class="hljs-string">&quot;admin.apikey&quot;</span> <span class="hljs-comment"># this is the real API key default value</span>
)

banking_ds = load_dataset(<span class="hljs-string">&quot;argilla/banking_sentiment_setfit&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)

<span class="hljs-comment"># Argilla expects labels in the annotation column</span>
<span class="hljs-comment"># We include labels for demo purposes</span>
banking_ds = banking_ds.rename_column(<span class="hljs-string">&quot;label&quot;</span>, <span class="hljs-string">&quot;annotation&quot;</span>)

<span class="hljs-comment"># Build argilla dataset from datasets</span>
argilla_ds = rg.read_datasets(banking_ds, task=<span class="hljs-string">&quot;TextClassification&quot;</span>)

<span class="hljs-comment"># Create dataset</span>
rg.log(argilla_ds, <span class="hljs-string">&quot;bankingapp_sentiment&quot;</span>)`}}),ze=new nt({}),Ve=new Ct({props:{code:"JTIzJTIwdGhpcyUyMHdpbGwlMjByZWFkJTIwdGhlJTIwZGF0YXNldCUyMGFuZCUyMHR1cm4lMjBpdCUyMGludG8lMjBhJTIwY2xlYW4lMjBkYXRhc2V0JTIwZm9yJTIwdHJhaW5pbmclMEFkYXRhc2V0JTIwJTNEJTIwcmcubG9hZCglMjJiYW5raW5nYXBwX3NlbnRpbWVudCUyMikucHJlcGFyZV9mb3JfdHJhaW5pbmcoKQ==",highlighted:`<span class="hljs-comment"># this will read the dataset and turn it into a clean dataset for training</span>
dataset = rg.load(<span class="hljs-string">&quot;bankingapp_sentiment&quot;</span>).prepare_for_training()`}}),qe=new Ct({props:{code:"ZnJvbSUyMHNlbnRlbmNlX3RyYW5zZm9ybWVycy5sb3NzZXMlMjBpbXBvcnQlMjBDb3NpbmVTaW1pbGFyaXR5TG9zcyUwQSUwQWZyb20lMjBzZXRmaXQlMjBpbXBvcnQlMjBTZXRGaXRNb2RlbCUyQyUyMFNldEZpdFRyYWluZXIlMEElMEElMjMlMjBDcmVhdGUlMjB0cmFpbiUyMHRlc3QlMjBzcGxpdCUwQWRhdGFzZXQlMjAlM0QlMjBkYXRhc2V0LnRyYWluX3Rlc3Rfc3BsaXQoKSUwQSUwQSUyMyUyMExvYWQlMjBTZXRGaXQlMjBtb2RlbCUyMGZyb20lMjBIdWIlMEFtb2RlbCUyMCUzRCUyMFNldEZpdE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJzZW50ZW5jZS10cmFuc2Zvcm1lcnMlMkZwYXJhcGhyYXNlLW1wbmV0LWJhc2UtdjIlMjIpJTBBJTBBJTIzJTIwQ3JlYXRlJTIwdHJhaW5lciUwQXRyYWluZXIlMjAlM0QlMjBTZXRGaXRUcmFpbmVyKCUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjB0cmFpbl9kYXRhc2V0JTNEZGF0YXNldCU1QiUyMnRyYWluJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwZXZhbF9kYXRhc2V0JTNEZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBsb3NzX2NsYXNzJTNEQ29zaW5lU2ltaWxhcml0eUxvc3MlMkMlMEElMjAlMjAlMjAlMjBiYXRjaF9zaXplJTNEOCUyQyUwQSUyMCUyMCUyMCUyMG51bV9pdGVyYXRpb25zJTNEMjAlMkMlMjAlMEEpJTBBJTBBJTIzJTIwVHJhaW4lMjBhbmQlMjBldmFsdWF0ZSUwQXRyYWluZXIudHJhaW4oKSUwQW1ldHJpY3MlMjAlM0QlMjB0cmFpbmVyLmV2YWx1YXRlKCk=",highlighted:`<span class="hljs-keyword">from</span> sentence_transformers.losses <span class="hljs-keyword">import</span> CosineSimilarityLoss

<span class="hljs-keyword">from</span> setfit <span class="hljs-keyword">import</span> SetFitModel, SetFitTrainer

<span class="hljs-comment"># Create train test split</span>
dataset = dataset.train_test_split()

<span class="hljs-comment"># Load SetFit model from Hub</span>
model = SetFitModel.from_pretrained(<span class="hljs-string">&quot;sentence-transformers/paraphrase-mpnet-base-v2&quot;</span>)

<span class="hljs-comment"># Create trainer</span>
trainer = SetFitTrainer(
    model=model,
    train_dataset=dataset[<span class="hljs-string">&quot;train&quot;</span>],
    eval_dataset=dataset[<span class="hljs-string">&quot;test&quot;</span>],
    loss_class=CosineSimilarityLoss,
    batch_size=<span class="hljs-number">8</span>,
    num_iterations=<span class="hljs-number">20</span>, 
)

<span class="hljs-comment"># Train and evaluate</span>
trainer.train()
metrics = trainer.evaluate()`}}),Ke=new Ct({props:{code:"JTIzJTIwc2F2ZSUyMGZ1bGwlMjBhcmdpbGxhJTIwZGF0YXNldCUyMGZvciUyMHJlcHJvZHVjaWJpbGl0eSUwQXJnLmxvYWQoJTIyYmFua2luZ2FwcF9zZW50aW1lbnQlMjIpLnRvX2RhdGFzZXRzKCkucHVzaF90b19odWIoJTIyYmFua2luZ2FwcF9zZW50aW1lbnQlMjIpJTIw",highlighted:`<span class="hljs-comment"># save full argilla dataset for reproducibility</span>
rg.load(<span class="hljs-string">&quot;bankingapp_sentiment&quot;</span>).to_datasets().push_to_hub(<span class="hljs-string">&quot;bankingapp_sentiment&quot;</span>) `}}),tt=new nt({}),{c(){h=s("meta"),f=p(),m=s("h1"),oe=s("a"),Ut=s("span"),y(Ae.$$.fragment),Jo=p(),Rt=s("span"),Co=l("Argilla on Spaces"),ul=p(),M=s("p"),Pt=s("strong"),Uo=l("Argilla"),Ro=l(" is an open-source, data labelling tool, for highly efficient human-in-the-loop and MLOps workflows. Argilla is composed of (1) a server and webapp for data labelling, and curation, and (2) a Python SDK for building data annotation workflows in Python. Argilla nicely integrates with the Hugging Face stack ("),Nt=s("code"),Po=l("datasets"),No=l(", "),Dt=s("code"),Do=l("transformers"),Oo=l(", "),Ot=s("code"),Yo=l("hub"),Go=l(", and "),Yt=s("code"),Zo=l("setfit"),Bo=l("), and now it can also be deployed using the Hub\u2019s Docker Spaces."),hl=p(),S=s("p"),Fo=l("Visit the "),Ie=s("a"),Wo=l("Argilla documentation"),Xo=l(" to learn about its features and check out the "),ke=s("a"),xo=l("Deep Dive Guides"),Ho=l(" and "),Se=s("a"),Qo=l("Tutorials"),Lo=l("."),fl=p(),se=s("p"),zo=l("In the next sections, you\u2019ll learn to deploy your own Argilla app and use it for data labelling workflows right from the Hub. This Argilla app is a "),Gt=s("strong"),Vo=l("self-contained application completely hosted on the Hub using Docker"),qo=l(". The diagram below illustrates the complete process."),ml=p(),$e=s("div"),Zt=s("img"),yl=p(),z=s("h2"),re=s("a"),Bt=s("span"),y(je.$$.fragment),Ko=p(),Ft=s("span"),es=l("Deploy Argilla on Spaces"),gl=p(),dt=s("p"),ts=l("You can deploy Argilla on Spaces with just a few clicks:"),wl=p(),Je=s("a"),Wt=s("img"),vl=p(),y(ie.$$.fragment),El=p(),T=s("p"),as=l("You need to define the "),Xt=s("strong"),ls=l("Owner"),os=l(" (your personal account or an organization), a "),xt=s("strong"),ss=l("Space name"),rs=l(", and the "),Ht=s("strong"),is=l("Visibility"),ns=l(". To interact with the Argilla app with Python, you need to set up the visibility to "),Qt=s("code"),ds=l("Public"),ps=l("."),bl=p(),Ce=s("div"),Lt=s("img"),_l=p(),y(ne.$$.fragment),Ml=p(),P=s("p"),cs=l("Once you have created the Space, you\u2019ll see the "),zt=s("code"),us=l("Building"),hs=l(" status and once it becomes "),Vt=s("code"),fs=l("Running"),ms=l(" your space is ready to go if you don\u2019t see the Argilla login UI refresh the page."),Tl=p(),A=s("p"),ys=l("The Space is configured with "),qt=s("strong"),gs=l("two users"),ws=l(": "),Kt=s("strong"),vs=l("argilla"),Es=l(" and "),ea=s("strong"),bs=l("admin"),_s=l(" with the same default password: "),ta=s("strong"),Ms=l("12345678"),Ts=l(". If you get a 500 error after login, make sure you have correctly introduced the user and password. To secure your Space, you can change the passwords and API keys using secret variables as explained in the next section."),Al=p(),V=s("h2"),de=s("a"),aa=s("span"),y(Ue.$$.fragment),As=p(),la=s("span"),Is=l("Set up passwords and API keys using secrets (optional)"),Il=p(),y(pe.$$.fragment),kl=p(),q=s("h2"),ce=s("a"),oa=s("span"),y(Re.$$.fragment),ks=p(),sa=s("span"),Ss=l("Setting up secret environment variables"),Sl=p(),ue=s("p"),$s=l("The Space template provides a way to set up different "),ra=s("strong"),js=l("optional settings"),Js=l(" focusing on securing your Argilla Space."),$l=p(),pt=s("p"),Cs=l("To set up these secrets, you can go to the Settings tab on your created Space. Make sure to save these values somewhere for later use."),jl=p(),_=s("p"),Us=l("The template Space has two users: "),ia=s("code"),Rs=l("admin"),Ps=l(" and "),na=s("code"),Ns=l("argilla"),Ds=l(". The username "),da=s("code"),Os=l("admin"),Ys=l(" corresponds to the root user, who can upload datasets and access any workspace within your Argilla Space. The username "),pa=s("code"),Gs=l("argilla"),Zs=l(" is a normal user with access to the "),ca=s("code"),Bs=l("argilla"),Fs=l(" workspace."),Jl=p(),ct=s("p"),Ws=l("The usernames, passwords, and API keys to upload, read, update, and delete datasets can be configured using the following secrets:"),Cl=p(),I=s("ul"),he=s("li"),ua=s("code"),Xs=l("ADMIN_USERNAME"),xs=l(": The admin username to log in Argilla. The default admin username is "),ha=s("code"),Hs=l("admin"),Qs=l(`. By setting up
a custom username you can use your own username to log in to the app.`),Ls=p(),fe=s("li"),fa=s("code"),zs=l("ADMIN_API_KEY"),Vs=l(`: Argilla provides a Python library to interact with the app (read, write, and update data, log model
predictions, etc.). If you don\u2019t set this variable, the library and your app will use the default API key
i.e. `),ma=s("code"),qs=l("admin.apikey"),Ks=l(`. If you want to secure your app for reading and writing data, we recommend you to set up this
variable. The API key can be any string of your choice. You can check an online generator if you like.`),er=p(),N=s("li"),ya=s("code"),tr=l("ADMIN_PASSWORD"),ar=l(": This sets a custom password to log in to the app with the "),ga=s("code"),lr=l("argilla"),or=l(` username. The default
password is `),wa=s("code"),sr=l("12345678"),rr=l(". By setting up a custom password you can use your own password to log in to the app."),ir=p(),me=s("li"),va=s("code"),nr=l("ANNOTATOR_USERNAME"),dr=l(": The annotator username to log in to Argilla. The default annotator username is "),Ea=s("code"),pr=l("argilla"),cr=l(`. By setting up
a custom username you can use your own username to log in to the app.`),ur=p(),D=s("li"),ba=s("code"),hr=l("ANNOTATOR_PASSWORD"),fr=l(": This sets a custom password to log in to the app with the "),_a=s("code"),mr=l("argilla"),yr=l(` username. The default password
is `),Ma=s("code"),gr=l("12345678"),wr=l(". By setting up a custom password you can use your own password to log in to the app."),Ul=p(),ut=s("p"),vr=l("The combination of these secret variables gives you the following setup options:"),Rl=p(),O=s("ol"),Y=s("li"),Ta=s("em"),Er=l("I want to avoid that anyone without the API keys adds, deletes, or updates datasets using the Python client"),br=l(": You need to setup "),Aa=s("code"),_r=l("ADMIN_PASSWORD"),Mr=l(" and "),Ia=s("code"),Tr=l("ADMIN_API_KEY"),Ar=l("."),Ir=p(),$=s("li"),Pe=s("em"),kr=l("Additionally, I want to avoid that the "),ka=s("code"),Sr=l("argilla"),$r=l(" username deletes datasets from the UI"),jr=l(": You need to setup "),Sa=s("code"),Jr=l("ANNOTATOR_PASSWORD"),Cr=l(" and use the "),$a=s("code"),Ur=l("argilla"),Rr=l(" generated API key with the Python Client (check your Space logs). This option might be interesting if you want to control dataset management but want anyone to browse your datasets using the "),ja=s("code"),Pr=l("argilla"),Nr=l(" user."),Dr=p(),j=s("li"),Ne=s("em"),Or=l("Additionally, I want to avoid that anyone without password browses my datasets with the "),Ja=s("code"),Yr=l("argilla"),Gr=l(" user"),Zr=l(": You need to setup "),Ca=s("code"),Br=l("ANNOTATOR_PASSWORD"),Fr=l(". In this case, you can use the "),Ua=s("code"),Wr=l("argilla"),Xr=l(" generated API key and/or "),Ra=s("code"),xr=l("ADMIN_API_KEY"),Hr=l(" values with the Python Client depending on your needs for dataset deletion rights."),Pl=p(),G=s("p"),Qr=l("Additionally, the "),Pa=s("code"),Lr=l("LOAD_DATASETS"),zr=l(" will let you configure the sample datasets that will be pre-loaded. The default value is "),Na=s("code"),Vr=l("single"),qr=l(" and the supported values for this variable are:"),Nl=p(),Z=s("ol"),ht=s("li"),Da=s("code"),Kr=l("single"),ei=l(": Load single datasets for TextClassification task."),ti=p(),ft=s("li"),Oa=s("code"),ai=l("full"),li=l(": Load all the sample datasets for NLP tasks (TokenClassification, TextClassification, Text2Text)"),oi=p(),mt=s("li"),Ya=s("code"),si=l("none"),ri=l(": No datasets being loaded."),Dl=p(),K=s("h2"),ye=s("a"),Ga=s("span"),y(De.$$.fragment),ii=p(),Za=s("span"),ni=l("How to upload data"),Ol=p(),yt=s("p"),di=l("Once your Argilla Space is running:"),Yl=p(),B=s("ol"),Oe=s("li"),pi=l("You need to find the "),Ba=s("strong"),ci=l("Space Direct URL under the \u201CEmbed this Space\u201D"),ui=l(" option (top right, see screenshot below)."),hi=p(),Ye=s("li"),fi=l("This URL gives you access to a full-screen Argilla UI for data labelling. The "),Fa=s("strong"),mi=l("Direct URL is the api_url parameter"),yi=l(" for connecting the argilla Python client in order to read and write data programmatically."),gi=p(),Ge=s("li"),wi=l("You are now ready to "),Wa=s("strong"),vi=l("upload your first dataset into Argilla"),Ei=l("."),Gl=p(),Ze=s("div"),Xa=s("img"),Zl=p(),y(ge.$$.fragment),Bl=p(),gt=s("p"),bi=l("For uploading Argilla datasets, there are two options:"),Fl=p(),we=s("ol"),k=s("li"),_i=l("You can use the "),xa=s("strong"),Mi=l("argilla Python library"),Ti=l(" inside Jupyter, Colab, VS Code, or other Python IDE. In this case, you will read read your source file ("),Ha=s("code"),Ai=l("csv"),Ii=l(", "),Qa=s("code"),ki=l("json"),Si=l(", etc.) and transform it into Argilla records. We recommend to read the "),Be=s("a"),$i=l("basics guide"),ji=l("."),Ji=p(),Fe=s("li"),Ci=l("You can use the "),La=s("strong"),We=s("a"),Ui=l("no-code data manager app"),Ri=l(" to upload a file and log it into Argilla. If you need to transform your dataset before uploading it into Argilla, we recommend the first option."),Wl=p(),F=s("p"),Pi=l("To follow a complete tutorial with Colab or Jupyter, "),Xe=s("a"),Ni=l("check this tutorial"),Di=l(". For a quick step-by-step example using the "),za=s("code"),Oi=l("argilla"),Yi=l(" Python library, keep reading."),Xl=p(),wt=s("p"),Gi=l("First, you need to open a Python IDE, we highly recommend using Jupyter notebooks or Colab."),xl=p(),J=s("p"),Zi=l("Second, you need to "),Va=s("code"),Bi=l("pip"),Fi=l(" install "),qa=s("code"),Wi=l("datasets"),Xi=l(" and "),Ka=s("code"),xi=l("argilla"),Hi=l(" on Colab or your local machine:"),Hl=p(),y(xe.$$.fragment),Ql=p(),W=s("p"),Qi=l("Third, you need to read the dataset using the "),el=s("code"),Li=l("datasets"),zi=l(" library. For reading other file types, check the "),He=s("a"),Vi=l("basics guide"),qi=l("."),Ll=p(),y(Qe.$$.fragment),zl=p(),ve=s("p"),Ki=l("Fourth, you need to init the "),tl=s("code"),en=l("argilla"),tn=l(" client with your Space URL and API key and upload the records into Argilla:"),Vl=p(),y(Le.$$.fragment),ql=p(),vt=s("p"),an=l("Congrats! Your dataset is available in the Argilla UI for data labeling. Once you have labelled some data, you can train your first model by reading the dataset using Python."),Kl=p(),ee=s("h2"),Ee=s("a"),al=s("span"),y(ze.$$.fragment),ln=p(),ll=s("span"),on=l("How to train a model with labelled data"),eo=p(),Et=s("p"),sn=l("In this example, we use SetFit, but you can use any other model for training."),to=p(),bt=s("p"),rn=l("To train a model using your labeled data, you need to read the labelled dataset and prepare it for training:"),ao=p(),y(Ve.$$.fragment),lo=p(),_t=s("p"),nn=l("To train a SetFit model with this dataset:"),oo=p(),y(qe.$$.fragment),so=p(),Mt=s("p"),dn=l("Optionally, you can push the dataset to the Hub for later use:"),ro=p(),y(Ke.$$.fragment),io=p(),be=s("p"),pn=l("As a next step, check out the "),et=s("a"),cn=l("Argilla Tutorials"),un=l(" section. All the tutorials can be run using Colab or local Jupyter Notebooks."),no=p(),te=s("h2"),_e=s("a"),ol=s("span"),y(tt.$$.fragment),hn=p(),sl=s("span"),fn=l("Feedback and support"),po=p(),X=s("p"),mn=l("If you have suggestions or need specific support, please join "),at=s("a"),yn=l("Argilla Slack community"),gn=l(" or reach out on "),lt=s("a"),wn=l("Argilla\u2019s GitHub repository"),vn=l("."),this.h()},l(e){const n=$p('[data-svelte="svelte-1phssyn"]',document.head);h=r(n,"META",{name:!0,content:!0}),n.forEach(a),f=c(e),m=r(e,"H1",{class:!0});var ot=i(m);oe=r(ot,"A",{id:!0,class:!0,href:!0});var rl=i(oe);Ut=r(rl,"SPAN",{});var il=i(Ut);g(Ae.$$.fragment,il),il.forEach(a),rl.forEach(a),Jo=c(ot),Rt=r(ot,"SPAN",{});var nl=i(Rt);Co=o(nl,"Argilla on Spaces"),nl.forEach(a),ot.forEach(a),ul=c(e),M=r(e,"P",{});var U=i(M);Pt=r(U,"STRONG",{});var kn=i(Pt);Uo=o(kn,"Argilla"),kn.forEach(a),Ro=o(U," is an open-source, data labelling tool, for highly efficient human-in-the-loop and MLOps workflows. Argilla is composed of (1) a server and webapp for data labelling, and curation, and (2) a Python SDK for building data annotation workflows in Python. Argilla nicely integrates with the Hugging Face stack ("),Nt=r(U,"CODE",{});var Sn=i(Nt);Po=o(Sn,"datasets"),Sn.forEach(a),No=o(U,", "),Dt=r(U,"CODE",{});var $n=i(Dt);Do=o($n,"transformers"),$n.forEach(a),Oo=o(U,", "),Ot=r(U,"CODE",{});var jn=i(Ot);Yo=o(jn,"hub"),jn.forEach(a),Go=o(U,", and "),Yt=r(U,"CODE",{});var Jn=i(Yt);Zo=o(Jn,"setfit"),Jn.forEach(a),Bo=o(U,"), and now it can also be deployed using the Hub\u2019s Docker Spaces."),U.forEach(a),hl=c(e),S=r(e,"P",{});var Me=i(S);Fo=o(Me,"Visit the "),Ie=r(Me,"A",{href:!0,rel:!0});var Cn=i(Ie);Wo=o(Cn,"Argilla documentation"),Cn.forEach(a),Xo=o(Me," to learn about its features and check out the "),ke=r(Me,"A",{href:!0,rel:!0});var Un=i(ke);xo=o(Un,"Deep Dive Guides"),Un.forEach(a),Ho=o(Me," and "),Se=r(Me,"A",{href:!0,rel:!0});var Rn=i(Se);Qo=o(Rn,"Tutorials"),Rn.forEach(a),Lo=o(Me,"."),Me.forEach(a),fl=c(e),se=r(e,"P",{});var uo=i(se);zo=o(uo,"In the next sections, you\u2019ll learn to deploy your own Argilla app and use it for data labelling workflows right from the Hub. This Argilla app is a "),Gt=r(uo,"STRONG",{});var Pn=i(Gt);Vo=o(Pn,"self-contained application completely hosted on the Hub using Docker"),Pn.forEach(a),qo=o(uo,". The diagram below illustrates the complete process."),uo.forEach(a),ml=c(e),$e=r(e,"DIV",{class:!0});var Nn=i($e);Zt=r(Nn,"IMG",{src:!0}),Nn.forEach(a),yl=c(e),z=r(e,"H2",{class:!0});var ho=i(z);re=r(ho,"A",{id:!0,class:!0,href:!0});var Dn=i(re);Bt=r(Dn,"SPAN",{});var On=i(Bt);g(je.$$.fragment,On),On.forEach(a),Dn.forEach(a),Ko=c(ho),Ft=r(ho,"SPAN",{});var Yn=i(Ft);es=o(Yn,"Deploy Argilla on Spaces"),Yn.forEach(a),ho.forEach(a),gl=c(e),dt=r(e,"P",{});var Gn=i(dt);ts=o(Gn,"You can deploy Argilla on Spaces with just a few clicks:"),Gn.forEach(a),wl=c(e),Je=r(e,"A",{href:!0});var Zn=i(Je);Wt=r(Zn,"IMG",{src:!0}),Zn.forEach(a),vl=c(e),g(ie.$$.fragment,e),El=c(e),T=r(e,"P",{});var x=i(T);as=o(x,"You need to define the "),Xt=r(x,"STRONG",{});var Bn=i(Xt);ls=o(Bn,"Owner"),Bn.forEach(a),os=o(x," (your personal account or an organization), a "),xt=r(x,"STRONG",{});var Fn=i(xt);ss=o(Fn,"Space name"),Fn.forEach(a),rs=o(x,", and the "),Ht=r(x,"STRONG",{});var Wn=i(Ht);is=o(Wn,"Visibility"),Wn.forEach(a),ns=o(x,". To interact with the Argilla app with Python, you need to set up the visibility to "),Qt=r(x,"CODE",{});var Xn=i(Qt);ds=o(Xn,"Public"),Xn.forEach(a),ps=o(x,"."),x.forEach(a),bl=c(e),Ce=r(e,"DIV",{class:!0});var xn=i(Ce);Lt=r(xn,"IMG",{src:!0}),xn.forEach(a),_l=c(e),g(ne.$$.fragment,e),Ml=c(e),P=r(e,"P",{});var Tt=i(P);cs=o(Tt,"Once you have created the Space, you\u2019ll see the "),zt=r(Tt,"CODE",{});var Hn=i(zt);us=o(Hn,"Building"),Hn.forEach(a),hs=o(Tt," status and once it becomes "),Vt=r(Tt,"CODE",{});var Qn=i(Vt);fs=o(Qn,"Running"),Qn.forEach(a),ms=o(Tt," your space is ready to go if you don\u2019t see the Argilla login UI refresh the page."),Tt.forEach(a),Tl=c(e),A=r(e,"P",{});var H=i(A);ys=o(H,"The Space is configured with "),qt=r(H,"STRONG",{});var Ln=i(qt);gs=o(Ln,"two users"),Ln.forEach(a),ws=o(H,": "),Kt=r(H,"STRONG",{});var zn=i(Kt);vs=o(zn,"argilla"),zn.forEach(a),Es=o(H," and "),ea=r(H,"STRONG",{});var Vn=i(ea);bs=o(Vn,"admin"),Vn.forEach(a),_s=o(H," with the same default password: "),ta=r(H,"STRONG",{});var qn=i(ta);Ms=o(qn,"12345678"),qn.forEach(a),Ts=o(H,". If you get a 500 error after login, make sure you have correctly introduced the user and password. To secure your Space, you can change the passwords and API keys using secret variables as explained in the next section."),H.forEach(a),Al=c(e),V=r(e,"H2",{class:!0});var fo=i(V);de=r(fo,"A",{id:!0,class:!0,href:!0});var Kn=i(de);aa=r(Kn,"SPAN",{});var ed=i(aa);g(Ue.$$.fragment,ed),ed.forEach(a),Kn.forEach(a),As=c(fo),la=r(fo,"SPAN",{});var td=i(la);Is=o(td,"Set up passwords and API keys using secrets (optional)"),td.forEach(a),fo.forEach(a),Il=c(e),g(pe.$$.fragment,e),kl=c(e),q=r(e,"H2",{class:!0});var mo=i(q);ce=r(mo,"A",{id:!0,class:!0,href:!0});var ad=i(ce);oa=r(ad,"SPAN",{});var ld=i(oa);g(Re.$$.fragment,ld),ld.forEach(a),ad.forEach(a),ks=c(mo),sa=r(mo,"SPAN",{});var od=i(sa);Ss=o(od,"Setting up secret environment variables"),od.forEach(a),mo.forEach(a),Sl=c(e),ue=r(e,"P",{});var yo=i(ue);$s=o(yo,"The Space template provides a way to set up different "),ra=r(yo,"STRONG",{});var sd=i(ra);js=o(sd,"optional settings"),sd.forEach(a),Js=o(yo," focusing on securing your Argilla Space."),yo.forEach(a),$l=c(e),pt=r(e,"P",{});var rd=i(pt);Cs=o(rd,"To set up these secrets, you can go to the Settings tab on your created Space. Make sure to save these values somewhere for later use."),rd.forEach(a),jl=c(e),_=r(e,"P",{});var C=i(_);Us=o(C,"The template Space has two users: "),ia=r(C,"CODE",{});var id=i(ia);Rs=o(id,"admin"),id.forEach(a),Ps=o(C," and "),na=r(C,"CODE",{});var nd=i(na);Ns=o(nd,"argilla"),nd.forEach(a),Ds=o(C,". The username "),da=r(C,"CODE",{});var dd=i(da);Os=o(dd,"admin"),dd.forEach(a),Ys=o(C," corresponds to the root user, who can upload datasets and access any workspace within your Argilla Space. The username "),pa=r(C,"CODE",{});var pd=i(pa);Gs=o(pd,"argilla"),pd.forEach(a),Zs=o(C," is a normal user with access to the "),ca=r(C,"CODE",{});var cd=i(ca);Bs=o(cd,"argilla"),cd.forEach(a),Fs=o(C," workspace."),C.forEach(a),Jl=c(e),ct=r(e,"P",{});var ud=i(ct);Ws=o(ud,"The usernames, passwords, and API keys to upload, read, update, and delete datasets can be configured using the following secrets:"),ud.forEach(a),Cl=c(e),I=r(e,"UL",{});var Q=i(I);he=r(Q,"LI",{});var dl=i(he);ua=r(dl,"CODE",{});var hd=i(ua);Xs=o(hd,"ADMIN_USERNAME"),hd.forEach(a),xs=o(dl,": The admin username to log in Argilla. The default admin username is "),ha=r(dl,"CODE",{});var fd=i(ha);Hs=o(fd,"admin"),fd.forEach(a),Qs=o(dl,`. By setting up
a custom username you can use your own username to log in to the app.`),dl.forEach(a),Ls=c(Q),fe=r(Q,"LI",{});var pl=i(fe);fa=r(pl,"CODE",{});var md=i(fa);zs=o(md,"ADMIN_API_KEY"),md.forEach(a),Vs=o(pl,`: Argilla provides a Python library to interact with the app (read, write, and update data, log model
predictions, etc.). If you don\u2019t set this variable, the library and your app will use the default API key
i.e. `),ma=r(pl,"CODE",{});var yd=i(ma);qs=o(yd,"admin.apikey"),yd.forEach(a),Ks=o(pl,`. If you want to secure your app for reading and writing data, we recommend you to set up this
variable. The API key can be any string of your choice. You can check an online generator if you like.`),pl.forEach(a),er=c(Q),N=r(Q,"LI",{});var st=i(N);ya=r(st,"CODE",{});var gd=i(ya);tr=o(gd,"ADMIN_PASSWORD"),gd.forEach(a),ar=o(st,": This sets a custom password to log in to the app with the "),ga=r(st,"CODE",{});var wd=i(ga);lr=o(wd,"argilla"),wd.forEach(a),or=o(st,` username. The default
password is `),wa=r(st,"CODE",{});var vd=i(wa);sr=o(vd,"12345678"),vd.forEach(a),rr=o(st,". By setting up a custom password you can use your own password to log in to the app."),st.forEach(a),ir=c(Q),me=r(Q,"LI",{});var cl=i(me);va=r(cl,"CODE",{});var Ed=i(va);nr=o(Ed,"ANNOTATOR_USERNAME"),Ed.forEach(a),dr=o(cl,": The annotator username to log in to Argilla. The default annotator username is "),Ea=r(cl,"CODE",{});var bd=i(Ea);pr=o(bd,"argilla"),bd.forEach(a),cr=o(cl,`. By setting up
a custom username you can use your own username to log in to the app.`),cl.forEach(a),ur=c(Q),D=r(Q,"LI",{});var rt=i(D);ba=r(rt,"CODE",{});var _d=i(ba);hr=o(_d,"ANNOTATOR_PASSWORD"),_d.forEach(a),fr=o(rt,": This sets a custom password to log in to the app with the "),_a=r(rt,"CODE",{});var Md=i(_a);mr=o(Md,"argilla"),Md.forEach(a),yr=o(rt,` username. The default password
is `),Ma=r(rt,"CODE",{});var Td=i(Ma);gr=o(Td,"12345678"),Td.forEach(a),wr=o(rt,". By setting up a custom password you can use your own password to log in to the app."),rt.forEach(a),Q.forEach(a),Ul=c(e),ut=r(e,"P",{});var Ad=i(ut);vr=o(Ad,"The combination of these secret variables gives you the following setup options:"),Ad.forEach(a),Rl=c(e),O=r(e,"OL",{});var At=i(O);Y=r(At,"LI",{});var it=i(Y);Ta=r(it,"EM",{});var Id=i(Ta);Er=o(Id,"I want to avoid that anyone without the API keys adds, deletes, or updates datasets using the Python client"),Id.forEach(a),br=o(it,": You need to setup "),Aa=r(it,"CODE",{});var kd=i(Aa);_r=o(kd,"ADMIN_PASSWORD"),kd.forEach(a),Mr=o(it," and "),Ia=r(it,"CODE",{});var Sd=i(Ia);Tr=o(Sd,"ADMIN_API_KEY"),Sd.forEach(a),Ar=o(it,"."),it.forEach(a),Ir=c(At),$=r(At,"LI",{});var ae=i($);Pe=r(ae,"EM",{});var go=i(Pe);kr=o(go,"Additionally, I want to avoid that the "),ka=r(go,"CODE",{});var $d=i(ka);Sr=o($d,"argilla"),$d.forEach(a),$r=o(go," username deletes datasets from the UI"),go.forEach(a),jr=o(ae,": You need to setup "),Sa=r(ae,"CODE",{});var jd=i(Sa);Jr=o(jd,"ANNOTATOR_PASSWORD"),jd.forEach(a),Cr=o(ae," and use the "),$a=r(ae,"CODE",{});var Jd=i($a);Ur=o(Jd,"argilla"),Jd.forEach(a),Rr=o(ae," generated API key with the Python Client (check your Space logs). This option might be interesting if you want to control dataset management but want anyone to browse your datasets using the "),ja=r(ae,"CODE",{});var Cd=i(ja);Pr=o(Cd,"argilla"),Cd.forEach(a),Nr=o(ae," user."),ae.forEach(a),Dr=c(At),j=r(At,"LI",{});var le=i(j);Ne=r(le,"EM",{});var wo=i(Ne);Or=o(wo,"Additionally, I want to avoid that anyone without password browses my datasets with the "),Ja=r(wo,"CODE",{});var Ud=i(Ja);Yr=o(Ud,"argilla"),Ud.forEach(a),Gr=o(wo," user"),wo.forEach(a),Zr=o(le,": You need to setup "),Ca=r(le,"CODE",{});var Rd=i(Ca);Br=o(Rd,"ANNOTATOR_PASSWORD"),Rd.forEach(a),Fr=o(le,". In this case, you can use the "),Ua=r(le,"CODE",{});var Pd=i(Ua);Wr=o(Pd,"argilla"),Pd.forEach(a),Xr=o(le," generated API key and/or "),Ra=r(le,"CODE",{});var Nd=i(Ra);xr=o(Nd,"ADMIN_API_KEY"),Nd.forEach(a),Hr=o(le," values with the Python Client depending on your needs for dataset deletion rights."),le.forEach(a),At.forEach(a),Pl=c(e),G=r(e,"P",{});var It=i(G);Qr=o(It,"Additionally, the "),Pa=r(It,"CODE",{});var Dd=i(Pa);Lr=o(Dd,"LOAD_DATASETS"),Dd.forEach(a),zr=o(It," will let you configure the sample datasets that will be pre-loaded. The default value is "),Na=r(It,"CODE",{});var Od=i(Na);Vr=o(Od,"single"),Od.forEach(a),qr=o(It," and the supported values for this variable are:"),It.forEach(a),Nl=c(e),Z=r(e,"OL",{});var kt=i(Z);ht=r(kt,"LI",{});var En=i(ht);Da=r(En,"CODE",{});var Yd=i(Da);Kr=o(Yd,"single"),Yd.forEach(a),ei=o(En,": Load single datasets for TextClassification task."),En.forEach(a),ti=c(kt),ft=r(kt,"LI",{});var bn=i(ft);Oa=r(bn,"CODE",{});var Gd=i(Oa);ai=o(Gd,"full"),Gd.forEach(a),li=o(bn,": Load all the sample datasets for NLP tasks (TokenClassification, TextClassification, Text2Text)"),bn.forEach(a),oi=c(kt),mt=r(kt,"LI",{});var _n=i(mt);Ya=r(_n,"CODE",{});var Zd=i(Ya);si=o(Zd,"none"),Zd.forEach(a),ri=o(_n,": No datasets being loaded."),_n.forEach(a),kt.forEach(a),Dl=c(e),K=r(e,"H2",{class:!0});var vo=i(K);ye=r(vo,"A",{id:!0,class:!0,href:!0});var Bd=i(ye);Ga=r(Bd,"SPAN",{});var Fd=i(Ga);g(De.$$.fragment,Fd),Fd.forEach(a),Bd.forEach(a),ii=c(vo),Za=r(vo,"SPAN",{});var Wd=i(Za);ni=o(Wd,"How to upload data"),Wd.forEach(a),vo.forEach(a),Ol=c(e),yt=r(e,"P",{});var Xd=i(yt);di=o(Xd,"Once your Argilla Space is running:"),Xd.forEach(a),Yl=c(e),B=r(e,"OL",{});var St=i(B);Oe=r(St,"LI",{});var Eo=i(Oe);pi=o(Eo,"You need to find the "),Ba=r(Eo,"STRONG",{});var xd=i(Ba);ci=o(xd,"Space Direct URL under the \u201CEmbed this Space\u201D"),xd.forEach(a),ui=o(Eo," option (top right, see screenshot below)."),Eo.forEach(a),hi=c(St),Ye=r(St,"LI",{});var bo=i(Ye);fi=o(bo,"This URL gives you access to a full-screen Argilla UI for data labelling. The "),Fa=r(bo,"STRONG",{});var Hd=i(Fa);mi=o(Hd,"Direct URL is the api_url parameter"),Hd.forEach(a),yi=o(bo," for connecting the argilla Python client in order to read and write data programmatically."),bo.forEach(a),gi=c(St),Ge=r(St,"LI",{});var _o=i(Ge);wi=o(_o,"You are now ready to "),Wa=r(_o,"STRONG",{});var Qd=i(Wa);vi=o(Qd,"upload your first dataset into Argilla"),Qd.forEach(a),Ei=o(_o,"."),_o.forEach(a),St.forEach(a),Gl=c(e),Ze=r(e,"DIV",{class:!0});var Ld=i(Ze);Xa=r(Ld,"IMG",{src:!0}),Ld.forEach(a),Zl=c(e),g(ge.$$.fragment,e),Bl=c(e),gt=r(e,"P",{});var zd=i(gt);bi=o(zd,"For uploading Argilla datasets, there are two options:"),zd.forEach(a),Fl=c(e),we=r(e,"OL",{});var Mo=i(we);k=r(Mo,"LI",{});var L=i(k);_i=o(L,"You can use the "),xa=r(L,"STRONG",{});var Vd=i(xa);Mi=o(Vd,"argilla Python library"),Vd.forEach(a),Ti=o(L," inside Jupyter, Colab, VS Code, or other Python IDE. In this case, you will read read your source file ("),Ha=r(L,"CODE",{});var qd=i(Ha);Ai=o(qd,"csv"),qd.forEach(a),Ii=o(L,", "),Qa=r(L,"CODE",{});var Kd=i(Qa);ki=o(Kd,"json"),Kd.forEach(a),Si=o(L,", etc.) and transform it into Argilla records. We recommend to read the "),Be=r(L,"A",{href:!0,rel:!0});var ep=i(Be);$i=o(ep,"basics guide"),ep.forEach(a),ji=o(L,"."),L.forEach(a),Ji=c(Mo),Fe=r(Mo,"LI",{});var To=i(Fe);Ci=o(To,"You can use the "),La=r(To,"STRONG",{});var tp=i(La);We=r(tp,"A",{href:!0,rel:!0});var ap=i(We);Ui=o(ap,"no-code data manager app"),ap.forEach(a),tp.forEach(a),Ri=o(To," to upload a file and log it into Argilla. If you need to transform your dataset before uploading it into Argilla, we recommend the first option."),To.forEach(a),Mo.forEach(a),Wl=c(e),F=r(e,"P",{});var $t=i(F);Pi=o($t,"To follow a complete tutorial with Colab or Jupyter, "),Xe=r($t,"A",{href:!0,rel:!0});var lp=i(Xe);Ni=o(lp,"check this tutorial"),lp.forEach(a),Di=o($t,". For a quick step-by-step example using the "),za=r($t,"CODE",{});var op=i(za);Oi=o(op,"argilla"),op.forEach(a),Yi=o($t," Python library, keep reading."),$t.forEach(a),Xl=c(e),wt=r(e,"P",{});var sp=i(wt);Gi=o(sp,"First, you need to open a Python IDE, we highly recommend using Jupyter notebooks or Colab."),sp.forEach(a),xl=c(e),J=r(e,"P",{});var Te=i(J);Zi=o(Te,"Second, you need to "),Va=r(Te,"CODE",{});var rp=i(Va);Bi=o(rp,"pip"),rp.forEach(a),Fi=o(Te," install "),qa=r(Te,"CODE",{});var ip=i(qa);Wi=o(ip,"datasets"),ip.forEach(a),Xi=o(Te," and "),Ka=r(Te,"CODE",{});var np=i(Ka);xi=o(np,"argilla"),np.forEach(a),Hi=o(Te," on Colab or your local machine:"),Te.forEach(a),Hl=c(e),g(xe.$$.fragment,e),Ql=c(e),W=r(e,"P",{});var jt=i(W);Qi=o(jt,"Third, you need to read the dataset using the "),el=r(jt,"CODE",{});var dp=i(el);Li=o(dp,"datasets"),dp.forEach(a),zi=o(jt," library. For reading other file types, check the "),He=r(jt,"A",{href:!0,rel:!0});var pp=i(He);Vi=o(pp,"basics guide"),pp.forEach(a),qi=o(jt,"."),jt.forEach(a),Ll=c(e),g(Qe.$$.fragment,e),zl=c(e),ve=r(e,"P",{});var Ao=i(ve);Ki=o(Ao,"Fourth, you need to init the "),tl=r(Ao,"CODE",{});var cp=i(tl);en=o(cp,"argilla"),cp.forEach(a),tn=o(Ao," client with your Space URL and API key and upload the records into Argilla:"),Ao.forEach(a),Vl=c(e),g(Le.$$.fragment,e),ql=c(e),vt=r(e,"P",{});var up=i(vt);an=o(up,"Congrats! Your dataset is available in the Argilla UI for data labeling. Once you have labelled some data, you can train your first model by reading the dataset using Python."),up.forEach(a),Kl=c(e),ee=r(e,"H2",{class:!0});var Io=i(ee);Ee=r(Io,"A",{id:!0,class:!0,href:!0});var hp=i(Ee);al=r(hp,"SPAN",{});var fp=i(al);g(ze.$$.fragment,fp),fp.forEach(a),hp.forEach(a),ln=c(Io),ll=r(Io,"SPAN",{});var mp=i(ll);on=o(mp,"How to train a model with labelled data"),mp.forEach(a),Io.forEach(a),eo=c(e),Et=r(e,"P",{});var yp=i(Et);sn=o(yp,"In this example, we use SetFit, but you can use any other model for training."),yp.forEach(a),to=c(e),bt=r(e,"P",{});var gp=i(bt);rn=o(gp,"To train a model using your labeled data, you need to read the labelled dataset and prepare it for training:"),gp.forEach(a),ao=c(e),g(Ve.$$.fragment,e),lo=c(e),_t=r(e,"P",{});var wp=i(_t);nn=o(wp,"To train a SetFit model with this dataset:"),wp.forEach(a),oo=c(e),g(qe.$$.fragment,e),so=c(e),Mt=r(e,"P",{});var vp=i(Mt);dn=o(vp,"Optionally, you can push the dataset to the Hub for later use:"),vp.forEach(a),ro=c(e),g(Ke.$$.fragment,e),io=c(e),be=r(e,"P",{});var ko=i(be);pn=o(ko,"As a next step, check out the "),et=r(ko,"A",{href:!0,rel:!0});var Ep=i(et);cn=o(Ep,"Argilla Tutorials"),Ep.forEach(a),un=o(ko," section. All the tutorials can be run using Colab or local Jupyter Notebooks."),ko.forEach(a),no=c(e),te=r(e,"H2",{class:!0});var So=i(te);_e=r(So,"A",{id:!0,class:!0,href:!0});var bp=i(_e);ol=r(bp,"SPAN",{});var _p=i(ol);g(tt.$$.fragment,_p),_p.forEach(a),bp.forEach(a),hn=c(So),sl=r(So,"SPAN",{});var Mp=i(sl);fn=o(Mp,"Feedback and support"),Mp.forEach(a),So.forEach(a),po=c(e),X=r(e,"P",{});var Jt=i(X);mn=o(Jt,"If you have suggestions or need specific support, please join "),at=r(Jt,"A",{href:!0,rel:!0});var Tp=i(at);yn=o(Tp,"Argilla Slack community"),Tp.forEach(a),gn=o(Jt," or reach out on "),lt=r(Jt,"A",{href:!0,rel:!0});var Ap=i(lt);wn=o(Ap,"Argilla\u2019s GitHub repository"),Ap.forEach(a),vn=o(Jt,"."),Jt.forEach(a),this.h()},h(){u(h,"name","hf:doc:metadata"),u(h,"content",JSON.stringify(Np)),u(oe,"id","argilla-on-spaces"),u(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"),u(oe,"href","#argilla-on-spaces"),u(m,"class","relative group"),u(Ie,"href","https://docs.argilla.io"),u(Ie,"rel","nofollow"),u(ke,"href","https://docs.argilla.io/en/latest/guides/guides.html"),u(ke,"rel","nofollow"),u(Se,"href","https://docs.argilla.io/en/latest/tutorials/tutorials.html"),u(Se,"rel","nofollow"),$o(Zt.src,Mn="https://www.argilla.io/blog/hf_space/how.svg")||u(Zt,"src",Mn),u($e,"class","flex justify-center"),u(re,"id","deploy-argilla-on-spaces"),u(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"),u(re,"href","#deploy-argilla-on-spaces"),u(z,"class","relative group"),$o(Wt.src,Tn="https://huggingface.co/datasets/huggingface/badges/resolve/main/deploy-to-spaces-lg.svg")||u(Wt,"src",Tn),u(Je,"href","https://huggingface.co/new-space?template=argilla/argilla-template-space"),$o(Lt.src,An="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-argilla-new-space.png")||u(Lt,"src",An),u(Ce,"class","flex justify-center"),u(de,"id","set-up-passwords-and-api-keys-using-secrets-optional"),u(de,"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"),u(de,"href","#set-up-passwords-and-api-keys-using-secrets-optional"),u(V,"class","relative group"),u(ce,"id","setting-up-secret-environment-variables"),u(ce,"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"),u(ce,"href","#setting-up-secret-environment-variables"),u(q,"class","relative group"),u(ye,"id","how-to-upload-data"),u(ye,"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"),u(ye,"href","#how-to-upload-data"),u(K,"class","relative group"),$o(Xa.src,In="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-argilla-embed-space.png")||u(Xa,"src",In),u(Ze,"class","flex justify-center"),u(Be,"href","https://docs.argilla.io/en/latest/guides/how_to.html"),u(Be,"rel","nofollow"),u(We,"href","https://huggingface.co/spaces/argilla/data-manager"),u(We,"rel","nofollow"),u(Xe,"href","https://docs.argilla.io/en/latest/tutorials/notebooks/training-textclassification-setfit-fewshot.html"),u(Xe,"rel","nofollow"),u(He,"href","https://docs.argilla.io/en/latest/guides/how_to.html"),u(He,"rel","nofollow"),u(Ee,"id","how-to-train-a-model-with-labelled-data"),u(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"),u(Ee,"href","#how-to-train-a-model-with-labelled-data"),u(ee,"class","relative group"),u(et,"href","https://docs.argilla.io/en/latest/tutorials/tutorials.html"),u(et,"rel","nofollow"),u(_e,"id","feedback-and-support"),u(_e,"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"),u(_e,"href","#feedback-and-support"),u(te,"class","relative group"),u(at,"href","https://join.slack.com/t/rubrixworkspace/shared_invite/zt-whigkyjn-a3IUJLD7gDbTZ0rKlvcJ5g"),u(at,"rel","nofollow"),u(lt,"href","https://github.com/argilla-io/argilla"),u(lt,"rel","nofollow")},m(e,n){t(document.head,h),d(e,f,n),d(e,m,n),t(m,oe),t(oe,Ut),w(Ae,Ut,null),t(m,Jo),t(m,Rt),t(Rt,Co),d(e,ul,n),d(e,M,n),t(M,Pt),t(Pt,Uo),t(M,Ro),t(M,Nt),t(Nt,Po),t(M,No),t(M,Dt),t(Dt,Do),t(M,Oo),t(M,Ot),t(Ot,Yo),t(M,Go),t(M,Yt),t(Yt,Zo),t(M,Bo),d(e,hl,n),d(e,S,n),t(S,Fo),t(S,Ie),t(Ie,Wo),t(S,Xo),t(S,ke),t(ke,xo),t(S,Ho),t(S,Se),t(Se,Qo),t(S,Lo),d(e,fl,n),d(e,se,n),t(se,zo),t(se,Gt),t(Gt,Vo),t(se,qo),d(e,ml,n),d(e,$e,n),t($e,Zt),d(e,yl,n),d(e,z,n),t(z,re),t(re,Bt),w(je,Bt,null),t(z,Ko),t(z,Ft),t(Ft,es),d(e,gl,n),d(e,dt,n),t(dt,ts),d(e,wl,n),d(e,Je,n),t(Je,Wt),d(e,vl,n),w(ie,e,n),d(e,El,n),d(e,T,n),t(T,as),t(T,Xt),t(Xt,ls),t(T,os),t(T,xt),t(xt,ss),t(T,rs),t(T,Ht),t(Ht,is),t(T,ns),t(T,Qt),t(Qt,ds),t(T,ps),d(e,bl,n),d(e,Ce,n),t(Ce,Lt),d(e,_l,n),w(ne,e,n),d(e,Ml,n),d(e,P,n),t(P,cs),t(P,zt),t(zt,us),t(P,hs),t(P,Vt),t(Vt,fs),t(P,ms),d(e,Tl,n),d(e,A,n),t(A,ys),t(A,qt),t(qt,gs),t(A,ws),t(A,Kt),t(Kt,vs),t(A,Es),t(A,ea),t(ea,bs),t(A,_s),t(A,ta),t(ta,Ms),t(A,Ts),d(e,Al,n),d(e,V,n),t(V,de),t(de,aa),w(Ue,aa,null),t(V,As),t(V,la),t(la,Is),d(e,Il,n),w(pe,e,n),d(e,kl,n),d(e,q,n),t(q,ce),t(ce,oa),w(Re,oa,null),t(q,ks),t(q,sa),t(sa,Ss),d(e,Sl,n),d(e,ue,n),t(ue,$s),t(ue,ra),t(ra,js),t(ue,Js),d(e,$l,n),d(e,pt,n),t(pt,Cs),d(e,jl,n),d(e,_,n),t(_,Us),t(_,ia),t(ia,Rs),t(_,Ps),t(_,na),t(na,Ns),t(_,Ds),t(_,da),t(da,Os),t(_,Ys),t(_,pa),t(pa,Gs),t(_,Zs),t(_,ca),t(ca,Bs),t(_,Fs),d(e,Jl,n),d(e,ct,n),t(ct,Ws),d(e,Cl,n),d(e,I,n),t(I,he),t(he,ua),t(ua,Xs),t(he,xs),t(he,ha),t(ha,Hs),t(he,Qs),t(I,Ls),t(I,fe),t(fe,fa),t(fa,zs),t(fe,Vs),t(fe,ma),t(ma,qs),t(fe,Ks),t(I,er),t(I,N),t(N,ya),t(ya,tr),t(N,ar),t(N,ga),t(ga,lr),t(N,or),t(N,wa),t(wa,sr),t(N,rr),t(I,ir),t(I,me),t(me,va),t(va,nr),t(me,dr),t(me,Ea),t(Ea,pr),t(me,cr),t(I,ur),t(I,D),t(D,ba),t(ba,hr),t(D,fr),t(D,_a),t(_a,mr),t(D,yr),t(D,Ma),t(Ma,gr),t(D,wr),d(e,Ul,n),d(e,ut,n),t(ut,vr),d(e,Rl,n),d(e,O,n),t(O,Y),t(Y,Ta),t(Ta,Er),t(Y,br),t(Y,Aa),t(Aa,_r),t(Y,Mr),t(Y,Ia),t(Ia,Tr),t(Y,Ar),t(O,Ir),t(O,$),t($,Pe),t(Pe,kr),t(Pe,ka),t(ka,Sr),t(Pe,$r),t($,jr),t($,Sa),t(Sa,Jr),t($,Cr),t($,$a),t($a,Ur),t($,Rr),t($,ja),t(ja,Pr),t($,Nr),t(O,Dr),t(O,j),t(j,Ne),t(Ne,Or),t(Ne,Ja),t(Ja,Yr),t(Ne,Gr),t(j,Zr),t(j,Ca),t(Ca,Br),t(j,Fr),t(j,Ua),t(Ua,Wr),t(j,Xr),t(j,Ra),t(Ra,xr),t(j,Hr),d(e,Pl,n),d(e,G,n),t(G,Qr),t(G,Pa),t(Pa,Lr),t(G,zr),t(G,Na),t(Na,Vr),t(G,qr),d(e,Nl,n),d(e,Z,n),t(Z,ht),t(ht,Da),t(Da,Kr),t(ht,ei),t(Z,ti),t(Z,ft),t(ft,Oa),t(Oa,ai),t(ft,li),t(Z,oi),t(Z,mt),t(mt,Ya),t(Ya,si),t(mt,ri),d(e,Dl,n),d(e,K,n),t(K,ye),t(ye,Ga),w(De,Ga,null),t(K,ii),t(K,Za),t(Za,ni),d(e,Ol,n),d(e,yt,n),t(yt,di),d(e,Yl,n),d(e,B,n),t(B,Oe),t(Oe,pi),t(Oe,Ba),t(Ba,ci),t(Oe,ui),t(B,hi),t(B,Ye),t(Ye,fi),t(Ye,Fa),t(Fa,mi),t(Ye,yi),t(B,gi),t(B,Ge),t(Ge,wi),t(Ge,Wa),t(Wa,vi),t(Ge,Ei),d(e,Gl,n),d(e,Ze,n),t(Ze,Xa),d(e,Zl,n),w(ge,e,n),d(e,Bl,n),d(e,gt,n),t(gt,bi),d(e,Fl,n),d(e,we,n),t(we,k),t(k,_i),t(k,xa),t(xa,Mi),t(k,Ti),t(k,Ha),t(Ha,Ai),t(k,Ii),t(k,Qa),t(Qa,ki),t(k,Si),t(k,Be),t(Be,$i),t(k,ji),t(we,Ji),t(we,Fe),t(Fe,Ci),t(Fe,La),t(La,We),t(We,Ui),t(Fe,Ri),d(e,Wl,n),d(e,F,n),t(F,Pi),t(F,Xe),t(Xe,Ni),t(F,Di),t(F,za),t(za,Oi),t(F,Yi),d(e,Xl,n),d(e,wt,n),t(wt,Gi),d(e,xl,n),d(e,J,n),t(J,Zi),t(J,Va),t(Va,Bi),t(J,Fi),t(J,qa),t(qa,Wi),t(J,Xi),t(J,Ka),t(Ka,xi),t(J,Hi),d(e,Hl,n),w(xe,e,n),d(e,Ql,n),d(e,W,n),t(W,Qi),t(W,el),t(el,Li),t(W,zi),t(W,He),t(He,Vi),t(W,qi),d(e,Ll,n),w(Qe,e,n),d(e,zl,n),d(e,ve,n),t(ve,Ki),t(ve,tl),t(tl,en),t(ve,tn),d(e,Vl,n),w(Le,e,n),d(e,ql,n),d(e,vt,n),t(vt,an),d(e,Kl,n),d(e,ee,n),t(ee,Ee),t(Ee,al),w(ze,al,null),t(ee,ln),t(ee,ll),t(ll,on),d(e,eo,n),d(e,Et,n),t(Et,sn),d(e,to,n),d(e,bt,n),t(bt,rn),d(e,ao,n),w(Ve,e,n),d(e,lo,n),d(e,_t,n),t(_t,nn),d(e,oo,n),w(qe,e,n),d(e,so,n),d(e,Mt,n),t(Mt,dn),d(e,ro,n),w(Ke,e,n),d(e,io,n),d(e,be,n),t(be,pn),t(be,et),t(et,cn),t(be,un),d(e,no,n),d(e,te,n),t(te,_e),t(_e,ol),w(tt,ol,null),t(te,hn),t(te,sl),t(sl,fn),d(e,po,n),d(e,X,n),t(X,mn),t(X,at),t(at,yn),t(X,gn),t(X,lt),t(lt,wn),t(X,vn),co=!0},p(e,[n]){const ot={};n&2&&(ot.$$scope={dirty:n,ctx:e}),ie.$set(ot);const rl={};n&2&&(rl.$$scope={dirty:n,ctx:e}),ne.$set(rl);const il={};n&2&&(il.$$scope={dirty:n,ctx:e}),pe.$set(il);const nl={};n&2&&(nl.$$scope={dirty:n,ctx:e}),ge.$set(nl)},i(e){co||(v(Ae.$$.fragment,e),v(je.$$.fragment,e),v(ie.$$.fragment,e),v(ne.$$.fragment,e),v(Ue.$$.fragment,e),v(pe.$$.fragment,e),v(Re.$$.fragment,e),v(De.$$.fragment,e),v(ge.$$.fragment,e),v(xe.$$.fragment,e),v(Qe.$$.fragment,e),v(Le.$$.fragment,e),v(ze.$$.fragment,e),v(Ve.$$.fragment,e),v(qe.$$.fragment,e),v(Ke.$$.fragment,e),v(tt.$$.fragment,e),co=!0)},o(e){E(Ae.$$.fragment,e),E(je.$$.fragment,e),E(ie.$$.fragment,e),E(ne.$$.fragment,e),E(Ue.$$.fragment,e),E(pe.$$.fragment,e),E(Re.$$.fragment,e),E(De.$$.fragment,e),E(ge.$$.fragment,e),E(xe.$$.fragment,e),E(Qe.$$.fragment,e),E(Le.$$.fragment,e),E(ze.$$.fragment,e),E(Ve.$$.fragment,e),E(qe.$$.fragment,e),E(Ke.$$.fragment,e),E(tt.$$.fragment,e),co=!1},d(e){a(h),e&&a(f),e&&a(m),b(Ae),e&&a(ul),e&&a(M),e&&a(hl),e&&a(S),e&&a(fl),e&&a(se),e&&a(ml),e&&a($e),e&&a(yl),e&&a(z),b(je),e&&a(gl),e&&a(dt),e&&a(wl),e&&a(Je),e&&a(vl),b(ie,e),e&&a(El),e&&a(T),e&&a(bl),e&&a(Ce),e&&a(_l),b(ne,e),e&&a(Ml),e&&a(P),e&&a(Tl),e&&a(A),e&&a(Al),e&&a(V),b(Ue),e&&a(Il),b(pe,e),e&&a(kl),e&&a(q),b(Re),e&&a(Sl),e&&a(ue),e&&a($l),e&&a(pt),e&&a(jl),e&&a(_),e&&a(Jl),e&&a(ct),e&&a(Cl),e&&a(I),e&&a(Ul),e&&a(ut),e&&a(Rl),e&&a(O),e&&a(Pl),e&&a(G),e&&a(Nl),e&&a(Z),e&&a(Dl),e&&a(K),b(De),e&&a(Ol),e&&a(yt),e&&a(Yl),e&&a(B),e&&a(Gl),e&&a(Ze),e&&a(Zl),b(ge,e),e&&a(Bl),e&&a(gt),e&&a(Fl),e&&a(we),e&&a(Wl),e&&a(F),e&&a(Xl),e&&a(wt),e&&a(xl),e&&a(J),e&&a(Hl),b(xe,e),e&&a(Ql),e&&a(W),e&&a(Ll),b(Qe,e),e&&a(zl),e&&a(ve),e&&a(Vl),b(Le,e),e&&a(ql),e&&a(vt),e&&a(Kl),e&&a(ee),b(ze),e&&a(eo),e&&a(Et),e&&a(to),e&&a(bt),e&&a(ao),b(Ve,e),e&&a(lo),e&&a(_t),e&&a(oo),b(qe,e),e&&a(so),e&&a(Mt),e&&a(ro),b(Ke,e),e&&a(io),e&&a(be),e&&a(no),e&&a(te),b(tt),e&&a(po),e&&a(X)}}}const Np={local:"argilla-on-spaces",sections:[{local:"deploy-argilla-on-spaces",title:"Deploy Argilla on Spaces"},{local:"set-up-passwords-and-api-keys-using-secrets-optional",title:"Set up passwords and API keys using secrets (optional)"},{local:"setting-up-secret-environment-variables",title:"Setting up secret environment variables"},{local:"how-to-upload-data",title:"How to upload data"},{local:"how-to-train-a-model-with-labelled-data",title:"How to train a model with labelled data"},{local:"feedback-and-support",title:"Feedback and support"}],title:"Argilla on Spaces"};function Dp(R){return jp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Bp extends Ip{constructor(h){super();kp(this,h,Dp,Pp,Sp,{})}}export{Bp as default,Np as metadata};
