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