import{s as ge,n as be,o as _e}from"../chunks/scheduler.6062bdaf.js";import{S as $e,i as Me,g as i,s as l,r as x,A as we,h as p,f as s,c as n,j as ue,u as k,x as c,k as de,y as He,a,v as C,d as U,t as J,w as G}from"../chunks/index.4bca734e.js";import{C as te}from"../chunks/CodeBlock.cbbddafc.js";import{H as se,E as Te}from"../chunks/index.60dd99e8.js";function ve(ae){let o,P,L,Z,f,E,r,le="이 튜토리얼에서는 <code>huggingface_hub</code>를 사용하여 Hub에서 모델, 데이터 세트 및 Spaces를 검색하는 방법을 배웁니다.",Q,h,X,m,ne=`<code>huggingface_hub</code> 라이브러리에는 Hub와 상호작용하기 위한 HTTP 클라이언트<a href="/docs/huggingface_hub/main/ko/package_reference/hf_api#huggingface_hub.HfApi">HfApi</a>가 포함되어 있습니다.
이를 통해, Hub에 저장된 모델, 데이터셋, 그리고 Spaces를 나열할 수 있습니다.`,z,u,R,d,ie='<a href="/docs/huggingface_hub/main/ko/package_reference/hf_api#huggingface_hub.HfApi.list_models">list_models()</a>의 출력은 Hub에 저장되어 있는 모델들을 나열한 결과입니다.',q,g,pe='마찬가지로, <a href="/docs/huggingface_hub/main/ko/package_reference/hf_api#huggingface_hub.HfApi.list_datasets">list_datasets()</a>를 사용하여 데이터 세트를 나열하고 <a href="/docs/huggingface_hub/main/ko/package_reference/hf_api#huggingface_hub.HfApi.list_spaces">list_spaces()</a>를 사용하여 Spaces를 나열할 수 있습니다.',A,b,B,_,ce=`리포지토리를 나열하는 것도 유용하지만, 검색을 필터링하고 싶을 수도 있습니다.
리스트에는 다음과 같은 여러 속성이 있습니다.`,N,$,oe="<li><code>filter</code></li> <li><code>author</code></li> <li><code>search</code></li> <li>…</li>",W,M,fe=`이 매개변수 중 두 개는 직관적입니다(<code>author</code> 및 <code>search</code>). 그렇다면 <code>filter</code>는 어떤 것을 나타낼까요?
<code>filter</code>는 <code>ModelFilter</code> 객체(또는 <code>DatasetFilter</code>)를 입력으로 받습니다. 이를 이용해 필터링 하고 싶은 모델을 지정하여 인스턴스를 생성할 수 있습니다.`,F,w,re="PyTorch로 작동되고 imagenet 데이터 세트로 훈련된, 이미지 분류를 위한 Hub의 모든 모델을 찾는 방법으로 예를 들어보겠습니다. 이 과정은 단일 [ModelFilter]를 사용하여 수행할 수 있습니다. 이때, 필터링 속성들은 ‘논리적 AND’로 결합되어, 지정한 모든 조건을 만족하는 모델만 선택됩니다.",I,H,Y,T,he="필터링하는 과정에서 모델을 정렬하고 상위 결과만 선택할 수도 있습니다. 다음 예제는 Hub에서 가장 많이 다운로드된 상위 5개 데이터 세트를 가져옵니다.",V,v,D,y,me='Hub에서 사용 가능한 필터에 대해 살펴보려면 웹브라우저에서 <a href="https://huggingface.co/models" rel="nofollow">모델</a> 및 <a href="https://huggingface.co/datasets" rel="nofollow">데이터 세트</a> 페이지를 방문하여 일부 매개변수를 검색한 다음, URL에서 값들을 확인해보세요.',K,j,O,S,ee;return f=new se({props:{title:"Hub에서 검색하기",local:"search-the-hub",headingTag:"h1"}}),h=new se({props:{title:"리포지토리를 어떻게 나열하나요?",local:"how-to-list-repositories-",headingTag:"h2"}}),u=new te({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMEhmQXBpJTBBYXBpJTIwJTNEJTIwSGZBcGkoKSUwQW1vZGVscyUyMCUzRCUyMGFwaS5saXN0X21vZGVscygp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> HfApi
<span class="hljs-meta">&gt;&gt;&gt; </span>api = HfApi()
<span class="hljs-meta">&gt;&gt;&gt; </span>models = api.list_models()`,wrap:!1}}),b=new se({props:{title:"리포지토리를 어떻게 필터링하나요?",local:"how-to-filter-repositories-",headingTag:"h2"}}),H=new te({props:{code:"bW9kZWxzJTIwJTNEJTIwaGZfYXBpLmxpc3RfbW9kZWxzKCUwQSUyMCUyMCUyMCUyMGZpbHRlciUzRE1vZGVsRmlsdGVyKCUwQSUwOSUwOXRhc2slM0QlMjJpbWFnZS1jbGFzc2lmaWNhdGlvbiUyMiUyQyUwQSUwOSUwOWxpYnJhcnklM0QlMjJweXRvcmNoJTIyJTJDJTBBJTA5JTA5dHJhaW5lZF9kYXRhc2V0JTNEJTIyaW1hZ2VuZXQlMjIlMEElMDkpJTBBKQ==",highlighted:`models = hf_api.list_models(
    <span class="hljs-built_in">filter</span>=ModelFilter(
		task=<span class="hljs-string">&quot;image-classification&quot;</span>,
		library=<span class="hljs-string">&quot;pytorch&quot;</span>,
		trained_dataset=<span class="hljs-string">&quot;imagenet&quot;</span>
	)
)`,wrap:!1}}),v=new te({props:{code:"bGlzdChsaXN0X2RhdGFzZXRzKHNvcnQlM0QlMjJkb3dubG9hZHMlMjIlMkMlMjBkaXJlY3Rpb24lM0QtMSUyQyUyMGxpbWl0JTNENSkp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(list_datasets(sort=<span class="hljs-string">&quot;downloads&quot;</span>, direction=-<span class="hljs-number">1</span>, limit=<span class="hljs-number">5</span>))
[DatasetInfo(
	<span class="hljs-built_in">id</span>=<span class="hljs-string">&#x27;argilla/databricks-dolly-15k-curated-en&#x27;</span>,
	author=<span class="hljs-string">&#x27;argilla&#x27;</span>,
	sha=<span class="hljs-string">&#x27;4dcd1dedbe148307a833c931b21ca456a1fc4281&#x27;</span>,
	last_modified=datetime.datetime(<span class="hljs-number">2023</span>, <span class="hljs-number">10</span>, <span class="hljs-number">2</span>, <span class="hljs-number">12</span>, <span class="hljs-number">32</span>, <span class="hljs-number">53</span>, tzinfo=datetime.timezone.utc),
	private=<span class="hljs-literal">False</span>,
	downloads=<span class="hljs-number">8889377</span>,
	(...)`,wrap:!1}}),j=new Te({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/ko/guides/search.md"}}),{c(){o=i("meta"),P=l(),L=i("p"),Z=l(),x(f.$$.fragment),E=l(),r=i("p"),r.innerHTML=le,Q=l(),x(h.$$.fragment),X=l(),m=i("p"),m.innerHTML=ne,z=l(),x(u.$$.fragment),R=l(),d=i("p"),d.innerHTML=ie,q=l(),g=i("p"),g.innerHTML=pe,A=l(),x(b.$$.fragment),B=l(),_=i("p"),_.textContent=ce,N=l(),$=i("ul"),$.innerHTML=oe,W=l(),M=i("p"),M.innerHTML=fe,F=l(),w=i("p"),w.textContent=re,I=l(),x(H.$$.fragment),Y=l(),T=i("p"),T.textContent=he,V=l(),x(v.$$.fragment),D=l(),y=i("p"),y.innerHTML=me,K=l(),x(j.$$.fragment),O=l(),S=i("p"),this.h()},l(e){const t=we("svelte-u9bgzb",document.head);o=p(t,"META",{name:!0,content:!0}),t.forEach(s),P=n(e),L=p(e,"P",{}),ue(L).forEach(s),Z=n(e),k(f.$$.fragment,e),E=n(e),r=p(e,"P",{"data-svelte-h":!0}),c(r)!=="svelte-le4amt"&&(r.innerHTML=le),Q=n(e),k(h.$$.fragment,e),X=n(e),m=p(e,"P",{"data-svelte-h":!0}),c(m)!=="svelte-naddyf"&&(m.innerHTML=ne),z=n(e),k(u.$$.fragment,e),R=n(e),d=p(e,"P",{"data-svelte-h":!0}),c(d)!=="svelte-1ywt7qm"&&(d.innerHTML=ie),q=n(e),g=p(e,"P",{"data-svelte-h":!0}),c(g)!=="svelte-bn3y4s"&&(g.innerHTML=pe),A=n(e),k(b.$$.fragment,e),B=n(e),_=p(e,"P",{"data-svelte-h":!0}),c(_)!=="svelte-1tvmxil"&&(_.textContent=ce),N=n(e),$=p(e,"UL",{"data-svelte-h":!0}),c($)!=="svelte-11piw8k"&&($.innerHTML=oe),W=n(e),M=p(e,"P",{"data-svelte-h":!0}),c(M)!=="svelte-pz9l7h"&&(M.innerHTML=fe),F=n(e),w=p(e,"P",{"data-svelte-h":!0}),c(w)!=="svelte-1uzqvll"&&(w.textContent=re),I=n(e),k(H.$$.fragment,e),Y=n(e),T=p(e,"P",{"data-svelte-h":!0}),c(T)!=="svelte-19mvq8d"&&(T.textContent=he),V=n(e),k(v.$$.fragment,e),D=n(e),y=p(e,"P",{"data-svelte-h":!0}),c(y)!=="svelte-1sye4bu"&&(y.innerHTML=me),K=n(e),k(j.$$.fragment,e),O=n(e),S=p(e,"P",{}),ue(S).forEach(s),this.h()},h(){de(o,"name","hf:doc:metadata"),de(o,"content",ye)},m(e,t){He(document.head,o),a(e,P,t),a(e,L,t),a(e,Z,t),C(f,e,t),a(e,E,t),a(e,r,t),a(e,Q,t),C(h,e,t),a(e,X,t),a(e,m,t),a(e,z,t),C(u,e,t),a(e,R,t),a(e,d,t),a(e,q,t),a(e,g,t),a(e,A,t),C(b,e,t),a(e,B,t),a(e,_,t),a(e,N,t),a(e,$,t),a(e,W,t),a(e,M,t),a(e,F,t),a(e,w,t),a(e,I,t),C(H,e,t),a(e,Y,t),a(e,T,t),a(e,V,t),C(v,e,t),a(e,D,t),a(e,y,t),a(e,K,t),C(j,e,t),a(e,O,t),a(e,S,t),ee=!0},p:be,i(e){ee||(U(f.$$.fragment,e),U(h.$$.fragment,e),U(u.$$.fragment,e),U(b.$$.fragment,e),U(H.$$.fragment,e),U(v.$$.fragment,e),U(j.$$.fragment,e),ee=!0)},o(e){J(f.$$.fragment,e),J(h.$$.fragment,e),J(u.$$.fragment,e),J(b.$$.fragment,e),J(H.$$.fragment,e),J(v.$$.fragment,e),J(j.$$.fragment,e),ee=!1},d(e){e&&(s(P),s(L),s(Z),s(E),s(r),s(Q),s(X),s(m),s(z),s(R),s(d),s(q),s(g),s(A),s(B),s(_),s(N),s($),s(W),s(M),s(F),s(w),s(I),s(Y),s(T),s(V),s(D),s(y),s(K),s(O),s(S)),s(o),G(f,e),G(h,e),G(u,e),G(b,e),G(H,e),G(v,e),G(j,e)}}}const ye='{"title":"Hub에서 검색하기","local":"search-the-hub","sections":[{"title":"리포지토리를 어떻게 나열하나요?","local":"how-to-list-repositories-","sections":[],"depth":2},{"title":"리포지토리를 어떻게 필터링하나요?","local":"how-to-filter-repositories-","sections":[],"depth":2}],"depth":1}';function je(ae){return _e(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Je extends $e{constructor(o){super(),Me(this,o,je,ve,ge,{})}}export{Je as component};
