import{s as Ut,n as $t,o as It}from"../chunks/scheduler.7b8d42e8.js";import{S as Ct,i as vt,g as s,s as n,r as m,A as Gt,h as o,f as l,c as i,j as bt,u as p,x as M,k as Jt,y as gt,a,v as u,d as r,t as d,w}from"../chunks/index.0671836c.js";import{C as Y}from"../chunks/CodeBlock.c4671c67.js";import{H as Mt,E as At}from"../chunks/EditOnGithub.15b2d305.js";function Bt(ct){let c,N,_,F,j,L,T,mt=`This quickstart is for local installation and usage.
If you want to use AutoTrain on Hugging Face Spaces, please refer to the <em>AutoTrain on Hugging Face Spaces</em> section.`,R,y,pt="You can install AutoTrain Advanced using pip:",H,f,S,h,ut=`It is advised to install autotrain-advanced in a virtual environment to avoid any conflicts with other packages.
Note: AutoTrain doesn’t install pytorch, torchaudio, torchvision, or any other large dependencies. You will need to install them separately.`,X,b,Q,J,V,U,rt="To run the autotrain app locally, you can use the following command:",z,$,P,I,dt="This will start the app on <code>http://127.0.0.1:8000</code>.",q,C,D,v,wt="It is also possible to use the CLI:",O,G,K,g,jt="This will show the CLI commands that can be used:",tt,A,et,B,Tt="It is advised to use only the <code>autotrain --config CONFIG_FILE</code> command for training when using the CLI.",lt,E,yt="The autotrain commands that end users will be interested in are:",at,x,ft="<li><code>app</code>: Start the AutoTrain UI</li> <li><code>llm</code>: Train a language model</li> <li><code>dreambooth</code>: Train a model using DreamBooth</li> <li><code>text-classification</code>: Train a text classification model</li> <li><code>text-regression</code>: Train a text regression model</li> <li><code>image-classification</code>: Train an image classification model</li> <li><code>tabular</code>: Train a tabular model</li> <li><code>spacerunner</code>: Train any custom model using SpaceRunner</li> <li><code>seq2seq</code>: Train a sequence-to-sequence model</li> <li><code>token-classification</code>: Train a token classification model</li>",nt,Z,ht="Note: above commands are not required if you use preferred <code>autotrain --config CONFIG_FILE</code> command to train the models.",it,W,st,k,ot;return j=new Mt({props:{title:"Quickstart",local:"quickstart",headingTag:"h1"}}),f=new Y({props:{code:"JTI0JTIwcGlwJTIwaW5zdGFsbCUyMGF1dG90cmFpbi1hZHZhbmNlZA==",highlighted:"$ pip install autotrain-advanced",wrap:!1}}),b=new Y({props:{code:"JTI0JTIwY29uZGElMjBjcmVhdGUlMjAtbiUyMGF1dG90cmFpbiUyMHB5dGhvbiUzRDMuMTAlMEElMjQlMjBjb25kYSUyMGFjdGl2YXRlJTIwYXV0b3RyYWluJTBBJTI0JTIwcGlwJTIwaW5zdGFsbCUyMGF1dG90cmFpbi1hZHZhbmNlZCUwQSUyNCUyMGNvbmRhJTIwaW5zdGFsbCUyMHB5dG9yY2glMjB0b3JjaHZpc2lvbiUyMHRvcmNoYXVkaW8lMjBweXRvcmNoLWN1ZGElM0QxMi4xJTIwLWMlMjBweXRvcmNoJTIwLWMlMjBudmlkaWElMEElMjQlMjBjb25kYSUyMGluc3RhbGwlMjAtYyUyMCUyMm52aWRpYSUyRmxhYmVsJTJGY3VkYS0xMi4xLjAlMjIlMjBjdWRhLW52Y2MlMEElMjQlMjBjb25kYSUyMGluc3RhbGwlMjB4Zm9ybWVycyUyMC1jJTIweGZvcm1lcnMlMEElMjQlMjBweXRob24lMjAtbSUyMG5sdGsuZG93bmxvYWRlciUyMHB1bmt0JTBBJTI0JTIwcGlwJTIwaW5zdGFsbCUyMGZsYXNoLWF0dG4lMjAtLW5vLWJ1aWxkLWlzb2xhdGlvbiUyMCUyMyUyMGlmJTIweW91JTIwd2FudCUyMHRvJTIwdXNlJTIwZmxhc2gtYXR0biUwQSUyNCUyMHBpcCUyMGluc3RhbGwlMjBkZWVwc3BlZWQlMjAlMjMlMjBpZiUyMHlvdSUyMHdhbnQlMjB0byUyMHVzZSUyMGRlZXBzcGVlZA==",highlighted:`$ conda create -n autotrain python=3.10
$ conda activate autotrain
$ pip install autotrain-advanced
$ conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
$ conda install -c <span class="hljs-string">&quot;nvidia/label/cuda-12.1.0&quot;</span> cuda-nvcc
$ conda install xformers -c xformers
$ python -m nltk.downloader punkt
$ pip install flash-attn --no-build-isolation <span class="hljs-comment"># if you want to use flash-attn</span>
$ pip install deepspeed <span class="hljs-comment"># if you want to use deepspeed</span>`,wrap:!1}}),J=new Mt({props:{title:"Running AutoTrain User Interface (UI)",local:"running-autotrain-user-interface-ui",headingTag:"h1"}}),$=new Y({props:{code:"JTI0JTIwZXhwb3J0JTIwSEZfVE9LRU4lM0R5b3VyX2h1Z2dpbmdfZmFjZV93cml0ZV90b2tlbiUwQSUyNCUyMGF1dG90cmFpbiUyMGFwcCUyMC0taG9zdCUyMDEyNy4wLjAuMSUyMC0tcG9ydCUyMDgwMDA=",highlighted:`$ <span class="hljs-built_in">export</span> HF_TOKEN=your_hugging_face_write_token
$ autotrain app --host 127.0.0.1 --port 8000`,wrap:!1}}),C=new Mt({props:{title:"Using AutoTrain Command Line Interface (CLI)",local:"using-autotrain-command-line-interface-cli",headingTag:"h1"}}),G=new Y({props:{code:"JTI0JTIwZXhwb3J0JTIwSEZfVE9LRU4lM0R5b3VyX2h1Z2dpbmdfZmFjZV93cml0ZV90b2tlbiUwQSUyNCUyMGF1dG90cmFpbiUyMC0taGVscA==",highlighted:`$ <span class="hljs-built_in">export</span> HF_TOKEN=your_hugging_face_write_token
$ autotrain --<span class="hljs-built_in">help</span>`,wrap:!1}}),A=new Y({props:{code:"dXNhZ2UlM0ElMjBhdXRvdHJhaW4lMjAlM0Njb21tYW5kJTNFJTIwJTVCJTNDYXJncyUzRSU1RCUwQSUwQXBvc2l0aW9uYWwlMjBhcmd1bWVudHMlM0ElMEElN0IlMEElMjAlMjAlMjAlMjBhcHAlMkMlMEElMjAlMjAlMjAlMjBsbG0lMkMlMEElMjAlMjAlMjAlMjBzZXR1cCUyQyUwQSUyMCUyMCUyMCUyMGRyZWFtYm9vdGglMkMlMEElMjAlMjAlMjAlMjBhcGklMkMlMEElMjAlMjAlMjAlMjB0ZXh0LWNsYXNzaWZpY2F0aW9uJTJDJTBBJTIwJTIwJTIwJTIwdGV4dC1yZWdyZXNzaW9uJTJDJTBBJTIwJTIwJTIwJTIwaW1hZ2UtY2xhc3NpZmljYXRpb24lMkMlMEElMjAlMjAlMjAlMjB0YWJ1bGFyJTJDJTBBJTIwJTIwJTIwJTIwc3BhY2VydW5uZXIlMkMlMEElMjAlMjAlMjAlMjBzZXEyc2VxJTJDJTBBJTIwJTIwJTIwJTIwdG9rZW4tY2xhc3NpZmljYXRpb24lMEElN0QlMEElMjAlMjAlMjAlMjAlMEElMjAlMjAlMjAlMjBjb21tYW5kcyUwQSUwQW9wdGlvbnMlM0ElMEElMjAlMjAtaCUyQyUyMC0taGVscCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHNob3clMjB0aGlzJTIwaGVscCUyMG1lc3NhZ2UlMjBhbmQlMjBleGl0JTBBJTIwJTIwLS12ZXJzaW9uJTJDJTIwLXYlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBEaXNwbGF5JTIwQXV0b1RyYWluJTIwdmVyc2lvbiUwQSUyMCUyMC0tY29uZmlnJTIwQ09ORklHJTIwJTIwJTIwJTIwJTIwJTIwJTIwT3B0aW9uYWwlMjBjb25maWd1cmF0aW9uJTIwZmlsZSUwQSUwQUZvciUyMG1vcmUlMjBpbmZvcm1hdGlvbiUyMGFib3V0JTIwYSUyMGNvbW1hbmQlMkMlMjBydW4lM0ElMjAlNjBhdXRvdHJhaW4lMjAlM0Njb21tYW5kJTNFJTIwLS1oZWxwJTYw",highlighted:`usage: autotrain &lt;<span class="hljs-built_in">command</span>&gt; [&lt;args&gt;]

positional arguments:
{
    app,
    llm,
    setup,
    dreambooth,
    api,
    text-classification,
    text-regression,
    image-classification,
    tabular,
    spacerunner,
    seq2seq,
    token-classification
}
    
    commands

options:
  -h, --<span class="hljs-built_in">help</span>            show this <span class="hljs-built_in">help</span> message and <span class="hljs-built_in">exit</span>
  --version, -v         Display AutoTrain version
  --config CONFIG       Optional configuration file

For more information about a <span class="hljs-built_in">command</span>, run: \`autotrain &lt;<span class="hljs-built_in">command</span>&gt; --<span class="hljs-built_in">help</span>\``,wrap:!1}}),W=new At({props:{source:"https://github.com/huggingface/autotrain-advanced/blob/main/docs/source/quickstart.mdx"}}),{c(){c=s("meta"),N=n(),_=s("p"),F=n(),m(j.$$.fragment),L=n(),T=s("p"),T.innerHTML=mt,R=n(),y=s("p"),y.textContent=pt,H=n(),m(f.$$.fragment),S=n(),h=s("p"),h.textContent=ut,X=n(),m(b.$$.fragment),Q=n(),m(J.$$.fragment),V=n(),U=s("p"),U.textContent=rt,z=n(),m($.$$.fragment),P=n(),I=s("p"),I.innerHTML=dt,q=n(),m(C.$$.fragment),D=n(),v=s("p"),v.textContent=wt,O=n(),m(G.$$.fragment),K=n(),g=s("p"),g.textContent=jt,tt=n(),m(A.$$.fragment),et=n(),B=s("p"),B.innerHTML=Tt,lt=n(),E=s("p"),E.textContent=yt,at=n(),x=s("ul"),x.innerHTML=ft,nt=n(),Z=s("p"),Z.innerHTML=ht,it=n(),m(W.$$.fragment),st=n(),k=s("p"),this.h()},l(t){const e=Gt("svelte-u9bgzb",document.head);c=o(e,"META",{name:!0,content:!0}),e.forEach(l),N=i(t),_=o(t,"P",{}),bt(_).forEach(l),F=i(t),p(j.$$.fragment,t),L=i(t),T=o(t,"P",{"data-svelte-h":!0}),M(T)!=="svelte-o0hoxj"&&(T.innerHTML=mt),R=i(t),y=o(t,"P",{"data-svelte-h":!0}),M(y)!=="svelte-1sqma0a"&&(y.textContent=pt),H=i(t),p(f.$$.fragment,t),S=i(t),h=o(t,"P",{"data-svelte-h":!0}),M(h)!=="svelte-a3nlls"&&(h.textContent=ut),X=i(t),p(b.$$.fragment,t),Q=i(t),p(J.$$.fragment,t),V=i(t),U=o(t,"P",{"data-svelte-h":!0}),M(U)!=="svelte-13i40lg"&&(U.textContent=rt),z=i(t),p($.$$.fragment,t),P=i(t),I=o(t,"P",{"data-svelte-h":!0}),M(I)!=="svelte-zl58rt"&&(I.innerHTML=dt),q=i(t),p(C.$$.fragment,t),D=i(t),v=o(t,"P",{"data-svelte-h":!0}),M(v)!=="svelte-j0fde6"&&(v.textContent=wt),O=i(t),p(G.$$.fragment,t),K=i(t),g=o(t,"P",{"data-svelte-h":!0}),M(g)!=="svelte-1fj1kbf"&&(g.textContent=jt),tt=i(t),p(A.$$.fragment,t),et=i(t),B=o(t,"P",{"data-svelte-h":!0}),M(B)!=="svelte-1uxv9za"&&(B.innerHTML=Tt),lt=i(t),E=o(t,"P",{"data-svelte-h":!0}),M(E)!=="svelte-1okhdph"&&(E.textContent=yt),at=i(t),x=o(t,"UL",{"data-svelte-h":!0}),M(x)!=="svelte-vx5lhh"&&(x.innerHTML=ft),nt=i(t),Z=o(t,"P",{"data-svelte-h":!0}),M(Z)!=="svelte-1da44rj"&&(Z.innerHTML=ht),it=i(t),p(W.$$.fragment,t),st=i(t),k=o(t,"P",{}),bt(k).forEach(l),this.h()},h(){Jt(c,"name","hf:doc:metadata"),Jt(c,"content",Et)},m(t,e){gt(document.head,c),a(t,N,e),a(t,_,e),a(t,F,e),u(j,t,e),a(t,L,e),a(t,T,e),a(t,R,e),a(t,y,e),a(t,H,e),u(f,t,e),a(t,S,e),a(t,h,e),a(t,X,e),u(b,t,e),a(t,Q,e),u(J,t,e),a(t,V,e),a(t,U,e),a(t,z,e),u($,t,e),a(t,P,e),a(t,I,e),a(t,q,e),u(C,t,e),a(t,D,e),a(t,v,e),a(t,O,e),u(G,t,e),a(t,K,e),a(t,g,e),a(t,tt,e),u(A,t,e),a(t,et,e),a(t,B,e),a(t,lt,e),a(t,E,e),a(t,at,e),a(t,x,e),a(t,nt,e),a(t,Z,e),a(t,it,e),u(W,t,e),a(t,st,e),a(t,k,e),ot=!0},p:$t,i(t){ot||(r(j.$$.fragment,t),r(f.$$.fragment,t),r(b.$$.fragment,t),r(J.$$.fragment,t),r($.$$.fragment,t),r(C.$$.fragment,t),r(G.$$.fragment,t),r(A.$$.fragment,t),r(W.$$.fragment,t),ot=!0)},o(t){d(j.$$.fragment,t),d(f.$$.fragment,t),d(b.$$.fragment,t),d(J.$$.fragment,t),d($.$$.fragment,t),d(C.$$.fragment,t),d(G.$$.fragment,t),d(A.$$.fragment,t),d(W.$$.fragment,t),ot=!1},d(t){t&&(l(N),l(_),l(F),l(L),l(T),l(R),l(y),l(H),l(S),l(h),l(X),l(Q),l(V),l(U),l(z),l(P),l(I),l(q),l(D),l(v),l(O),l(K),l(g),l(tt),l(et),l(B),l(lt),l(E),l(at),l(x),l(nt),l(Z),l(it),l(st),l(k)),l(c),w(j,t),w(f,t),w(b,t),w(J,t),w($,t),w(C,t),w(G,t),w(A,t),w(W,t)}}}const Et='{"title":"Quickstart","local":"quickstart","sections":[],"depth":1}';function xt(ct){return It(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yt extends Ct{constructor(c){super(),vt(this,c,xt,Bt,Ut,{})}}export{Yt as component};
