import{s as We,o as Be,n as Re}from"../chunks/scheduler.6062bdaf.js";import{S as Je,i as Ke,g as s,s as o,r as m,A as Qe,h as l,f as n,c as i,j as ee,u as _,x as d,k as te,y as r,a as g,v as b,d as $,t as k,w as v}from"../chunks/index.4bca734e.js";import{T as Ge}from"../chunks/Tip.b9ac1f03.js";import{D as _e}from"../chunks/Docstring.8c24c207.js";import{H as oe,E as Xe}from"../chunks/index.fb1f0efe.js";function Ye(S){let a,T=`<a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.login">login()</a> is a drop-in replacement method for <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.notebook_login">notebook_login()</a> as it wraps and
extends its capabilities.`;return{c(){a=s("p"),a.innerHTML=T},l(c){a=l(c,"P",{"data-svelte-h":!0}),d(a)!=="svelte-1hqlf7o"&&(a.innerHTML=T)},m(c,y){g(c,a,y)},p:Re,d(c){c&&n(a)}}}function Ze(S){let a,T=`When the token is not passed, <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.login">login()</a> will automatically detect if the script runs
in a notebook or not. However, this detection might not be accurate due to the
variety of notebooks that exists nowadays. If that is the case, you can always force
the UI by using <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.notebook_login">notebook_login()</a> or <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.interpreter_login">interpreter_login()</a>.`;return{c(){a=s("p"),a.innerHTML=T},l(c){a=l(c,"P",{"data-svelte-h":!0}),d(a)!=="svelte-5iyxkk"&&(a.innerHTML=T)},m(c,y){g(c,a,y)},p:Re,d(c){c&&n(a)}}}function et(S){let a,T,c,y,I,ie,M,Ee="<code>huggingface_hub</code> 라이브러리를 사용하면 사용자의 기기를 Hub에 프로그래밍적으로 로그인/로그아웃할 수 있습니다.",ae,E,Pe='인증에 대한 자세한 내용은 <a href="../quick-start#authentication">이 섹션</a>을 확인하세요.',re,P,ge,u,D,be,U,De="Login the machine to access the Hub.",$e,A,Ve=`The <code>token</code> is persisted in cache and set as a git credential. Once done, the machine
is logged in and the access token will be available across all <code>huggingface_hub</code>
components. If <code>token</code> is not provided, it will be prompted to the user either with
a widget (in a notebook) or via the terminal.`,ke,G,qe=`To log in from outside of a script, one can also use <code>huggingface-cli login</code> which is
a cli command that wraps <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.login">login()</a>.`,ve,H,we,L,se,V,le,f,q,xe,R,Fe="Displays a prompt to log in to the HF website and store the token.",Te,W,ze=`This is equivalent to <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.login">login()</a> without passing a token when not run in a notebook.
<a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.interpreter_login">interpreter_login()</a> is useful if you want to force the use of the terminal prompt
instead of a notebook widget.`,ye,B,Ne='For more details, see <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.login">login()</a>.',ce,F,ue,p,z,He,J,Oe="Displays a widget to log in to the HF website and store the token.",Le,K,je=`This is equivalent to <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.login">login()</a> without passing a token when run in a notebook.
<a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.notebook_login">notebook_login()</a> is useful if you want to force the use of the notebook widget
instead of a prompt in the terminal.`,Ce,Q,Se='For more details, see <a href="/docs/huggingface_hub/main/ko/package_reference/login#huggingface_hub.login">login()</a>.',he,N,de,w,O,Ie,X,Ue="Logout the machine from the Hub.",Me,Y,Ae="Token is deleted from the machine and removed from git credential.",fe,j,pe,ne,me;return I=new oe({props:{title:"로그인 및 로그아웃",local:"login-and-logout",headingTag:"h1"}}),P=new oe({props:{title:"로그인",local:"login ][ huggingface_hub.login",headingTag:"h2"}}),D=new _e({props:{name:"huggingface_hub.login",anchor:"huggingface_hub.login",parameters:[{name:"token",val:": typing.Optional[str] = None"},{name:"add_to_git_credential",val:": bool = False"},{name:"new_session",val:": bool = True"},{name:"write_permission",val:": bool = False"}],parametersDescription:[{anchor:"huggingface_hub.login.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
User access token to generate from <a href="https://huggingface.co/settings/token" rel="nofollow">https://huggingface.co/settings/token</a>.`,name:"token"},{anchor:"huggingface_hub.login.add_to_git_credential",description:`<strong>add_to_git_credential</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, token will be set as git credential. If no git credential helper
is configured, a warning will be displayed to the user. If <code>token</code> is <code>None</code>,
the value of <code>add_to_git_credential</code> is ignored and will be prompted again
to the end user.`,name:"add_to_git_credential"},{anchor:"huggingface_hub.login.new_session",description:`<strong>new_session</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
If <code>True</code>, will request a token even if one is already saved on the machine.`,name:"new_session"},{anchor:"huggingface_hub.login.write_permission",description:`<strong>write_permission</strong> (<code>bool</code>) &#x2014;
Ignored and deprecated argument.`,name:"write_permission"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_login.py#L58",raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#ValueError"
  rel="nofollow"
><code>ValueError</code></a> —
If an organization token is passed. Only personal account tokens are valid
to log in.</li>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#ValueError"
  rel="nofollow"
><code>ValueError</code></a> —
If token is invalid.</li>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#ImportError"
  rel="nofollow"
><code>ImportError</code></a> —
If running in a notebook but <code>ipywidgets</code> is not installed.</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code> or <code>ImportError</code></p>
`}}),H=new Ge({props:{$$slots:{default:[Ye]},$$scope:{ctx:S}}}),L=new Ge({props:{$$slots:{default:[Ze]},$$scope:{ctx:S}}}),V=new oe({props:{title:"인터프리터_로그인",local:"interpreter_login ][ huggingface_hub.interpreter_login",headingTag:"h2"}}),q=new _e({props:{name:"huggingface_hub.interpreter_login",anchor:"huggingface_hub.interpreter_login",parameters:[{name:"new_session",val:": bool = True"},{name:"write_permission",val:": bool = False"}],parametersDescription:[{anchor:"huggingface_hub.interpreter_login.new_session",description:`<strong>new_session</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
If <code>True</code>, will request a token even if one is already saved on the machine.`,name:"new_session"},{anchor:"huggingface_hub.interpreter_login.write_permission",description:`<strong>write_permission</strong> (<code>bool</code>) &#x2014;
Ignored and deprecated argument.`,name:"write_permission"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_login.py#L245"}}),F=new oe({props:{title:"노트북_로그인",local:"notebook_login ][ huggingface_hub.notebook_login",headingTag:"h2"}}),z=new _e({props:{name:"huggingface_hub.notebook_login",anchor:"huggingface_hub.notebook_login",parameters:[{name:"new_session",val:": bool = True"},{name:"write_permission",val:": bool = False"}],parametersDescription:[{anchor:"huggingface_hub.notebook_login.new_session",description:`<strong>new_session</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
If <code>True</code>, will request a token even if one is already saved on the machine.`,name:"new_session"},{anchor:"huggingface_hub.notebook_login.write_permission",description:`<strong>write_permission</strong> (<code>bool</code>) &#x2014;
Ignored and deprecated argument.`,name:"write_permission"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_login.py#L317"}}),N=new oe({props:{title:"로그아웃",local:"logout ][ huggingface_hub.logout",headingTag:"h2"}}),O=new _e({props:{name:"huggingface_hub.logout",anchor:"huggingface_hub.logout",parameters:[{name:"token_name",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"huggingface_hub.logout.token_name",description:`<strong>token_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Name of the access token to logout from. If <code>None</code>, will logout from all saved access tokens.`,name:"token_name"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_login.py#L133",raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#ValueError"
  rel="nofollow"
><code>ValueError</code></a> —
If the access token name is not found.</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code></p>
`}}),j=new Xe({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/ko/package_reference/login.md"}}),{c(){a=s("meta"),T=o(),c=s("p"),y=o(),m(I.$$.fragment),ie=o(),M=s("p"),M.innerHTML=Ee,ae=o(),E=s("p"),E.innerHTML=Pe,re=o(),m(P.$$.fragment),ge=o(),u=s("div"),m(D.$$.fragment),be=o(),U=s("p"),U.textContent=De,$e=o(),A=s("p"),A.innerHTML=Ve,ke=o(),G=s("p"),G.innerHTML=qe,ve=o(),m(H.$$.fragment),we=o(),m(L.$$.fragment),se=o(),m(V.$$.fragment),le=o(),f=s("div"),m(q.$$.fragment),xe=o(),R=s("p"),R.textContent=Fe,Te=o(),W=s("p"),W.innerHTML=ze,ye=o(),B=s("p"),B.innerHTML=Ne,ce=o(),m(F.$$.fragment),ue=o(),p=s("div"),m(z.$$.fragment),He=o(),J=s("p"),J.textContent=Oe,Le=o(),K=s("p"),K.innerHTML=je,Ce=o(),Q=s("p"),Q.innerHTML=Se,he=o(),m(N.$$.fragment),de=o(),w=s("div"),m(O.$$.fragment),Ie=o(),X=s("p"),X.textContent=Ue,Me=o(),Y=s("p"),Y.textContent=Ae,fe=o(),m(j.$$.fragment),pe=o(),ne=s("p"),this.h()},l(e){const t=Qe("svelte-u9bgzb",document.head);a=l(t,"META",{name:!0,content:!0}),t.forEach(n),T=i(e),c=l(e,"P",{}),ee(c).forEach(n),y=i(e),_(I.$$.fragment,e),ie=i(e),M=l(e,"P",{"data-svelte-h":!0}),d(M)!=="svelte-n6pnyz"&&(M.innerHTML=Ee),ae=i(e),E=l(e,"P",{"data-svelte-h":!0}),d(E)!=="svelte-arqyzt"&&(E.innerHTML=Pe),re=i(e),_(P.$$.fragment,e),ge=i(e),u=l(e,"DIV",{class:!0});var h=ee(u);_(D.$$.fragment,h),be=i(h),U=l(h,"P",{"data-svelte-h":!0}),d(U)!=="svelte-h0rxjs"&&(U.textContent=De),$e=i(h),A=l(h,"P",{"data-svelte-h":!0}),d(A)!=="svelte-1m8kult"&&(A.innerHTML=Ve),ke=i(h),G=l(h,"P",{"data-svelte-h":!0}),d(G)!=="svelte-1skx6m0"&&(G.innerHTML=qe),ve=i(h),_(H.$$.fragment,h),we=i(h),_(L.$$.fragment,h),h.forEach(n),se=i(e),_(V.$$.fragment,e),le=i(e),f=l(e,"DIV",{class:!0});var x=ee(f);_(q.$$.fragment,x),xe=i(x),R=l(x,"P",{"data-svelte-h":!0}),d(R)!=="svelte-1rvjqhd"&&(R.textContent=Fe),Te=i(x),W=l(x,"P",{"data-svelte-h":!0}),d(W)!=="svelte-1b7ixfc"&&(W.innerHTML=ze),ye=i(x),B=l(x,"P",{"data-svelte-h":!0}),d(B)!=="svelte-givd4n"&&(B.innerHTML=Ne),x.forEach(n),ce=i(e),_(F.$$.fragment,e),ue=i(e),p=l(e,"DIV",{class:!0});var C=ee(p);_(z.$$.fragment,C),He=i(C),J=l(C,"P",{"data-svelte-h":!0}),d(J)!=="svelte-bqvn6n"&&(J.textContent=Oe),Le=i(C),K=l(C,"P",{"data-svelte-h":!0}),d(K)!=="svelte-1nwuyz5"&&(K.innerHTML=je),Ce=i(C),Q=l(C,"P",{"data-svelte-h":!0}),d(Q)!=="svelte-givd4n"&&(Q.innerHTML=Se),C.forEach(n),he=i(e),_(N.$$.fragment,e),de=i(e),w=l(e,"DIV",{class:!0});var Z=ee(w);_(O.$$.fragment,Z),Ie=i(Z),X=l(Z,"P",{"data-svelte-h":!0}),d(X)!=="svelte-1462z46"&&(X.textContent=Ue),Me=i(Z),Y=l(Z,"P",{"data-svelte-h":!0}),d(Y)!=="svelte-1x6nsdy"&&(Y.textContent=Ae),Z.forEach(n),fe=i(e),_(j.$$.fragment,e),pe=i(e),ne=l(e,"P",{}),ee(ne).forEach(n),this.h()},h(){te(a,"name","hf:doc:metadata"),te(a,"content",tt),te(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),te(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),te(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),te(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){r(document.head,a),g(e,T,t),g(e,c,t),g(e,y,t),b(I,e,t),g(e,ie,t),g(e,M,t),g(e,ae,t),g(e,E,t),g(e,re,t),b(P,e,t),g(e,ge,t),g(e,u,t),b(D,u,null),r(u,be),r(u,U),r(u,$e),r(u,A),r(u,ke),r(u,G),r(u,ve),b(H,u,null),r(u,we),b(L,u,null),g(e,se,t),b(V,e,t),g(e,le,t),g(e,f,t),b(q,f,null),r(f,xe),r(f,R),r(f,Te),r(f,W),r(f,ye),r(f,B),g(e,ce,t),b(F,e,t),g(e,ue,t),g(e,p,t),b(z,p,null),r(p,He),r(p,J),r(p,Le),r(p,K),r(p,Ce),r(p,Q),g(e,he,t),b(N,e,t),g(e,de,t),g(e,w,t),b(O,w,null),r(w,Ie),r(w,X),r(w,Me),r(w,Y),g(e,fe,t),b(j,e,t),g(e,pe,t),g(e,ne,t),me=!0},p(e,[t]){const h={};t&2&&(h.$$scope={dirty:t,ctx:e}),H.$set(h);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),L.$set(x)},i(e){me||($(I.$$.fragment,e),$(P.$$.fragment,e),$(D.$$.fragment,e),$(H.$$.fragment,e),$(L.$$.fragment,e),$(V.$$.fragment,e),$(q.$$.fragment,e),$(F.$$.fragment,e),$(z.$$.fragment,e),$(N.$$.fragment,e),$(O.$$.fragment,e),$(j.$$.fragment,e),me=!0)},o(e){k(I.$$.fragment,e),k(P.$$.fragment,e),k(D.$$.fragment,e),k(H.$$.fragment,e),k(L.$$.fragment,e),k(V.$$.fragment,e),k(q.$$.fragment,e),k(F.$$.fragment,e),k(z.$$.fragment,e),k(N.$$.fragment,e),k(O.$$.fragment,e),k(j.$$.fragment,e),me=!1},d(e){e&&(n(T),n(c),n(y),n(ie),n(M),n(ae),n(E),n(re),n(ge),n(u),n(se),n(le),n(f),n(ce),n(ue),n(p),n(he),n(de),n(w),n(fe),n(pe),n(ne)),n(a),v(I,e),v(P,e),v(D),v(H),v(L),v(V,e),v(q),v(F,e),v(z),v(N,e),v(O),v(j,e)}}}const tt='{"title":"로그인 및 로그아웃","local":"login-and-logout","sections":[{"title":"로그인","local":"login ][ huggingface_hub.login","sections":[],"depth":2},{"title":"인터프리터_로그인","local":"interpreter_login ][ huggingface_hub.interpreter_login","sections":[],"depth":2},{"title":"노트북_로그인","local":"notebook_login ][ huggingface_hub.notebook_login","sections":[],"depth":2},{"title":"로그아웃","local":"logout ][ huggingface_hub.logout","sections":[],"depth":2}],"depth":1}';function nt(S){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class st extends Je{constructor(a){super(),Ke(this,a,nt,et,We,{})}}export{st as component};
