import{s as mt,o as gt,n as ft}from"../chunks/scheduler.d6170356.js";import{S as ht,i as kt,g as l,s as n,r as d,A as yt,h as o,f as s,c as a,j as ut,u as c,x as p,k as te,y as $t,a as i,v as f,d as m,t as g,w as h}from"../chunks/index.fcd4cc08.js";import{T as dt}from"../chunks/Tip.b09c67cf.js";import{C as ct}from"../chunks/CodeBlock.db16bf50.js";import{H as C,E as vt}from"../chunks/index.57043804.js";function wt(se){let r,k=`IMPORTANT NOTE ABOUT DATA PERSISTENCE:
You can use the Giskard Space as is for initial exploration and experimentation. For <strong>longer use in
small-scale projects, activate the <a href="https://huggingface.co/docs/hub/spaces-storage" rel="nofollow">paid persistent storage option</a></strong>. This prevents data loss during Space restarts which
occur every 24 hours.`;return{c(){r=l("p"),r.innerHTML=k},l(u){r=o(u,"P",{"data-svelte-h":!0}),p(r)!=="svelte-1f9zzcx"&&(r.innerHTML=k)},m(u,y){i(u,r,y)},p:ft,d(u){u&&s(r)}}}function Tt(se){let r,k=`For more information on how to create test suites from Giskard’s Python library’s automated model scanning tool, head
over to Giskard’s <a href="https://docs.giskard.ai/en/latest/getting_started/quickstart/index.html" rel="nofollow">Quickstart Guides</a>.`;return{c(){r=l("p"),r.innerHTML=k},l(u){r=o(u,"P",{"data-svelte-h":!0}),p(r)!=="svelte-vjpqik"&&(r.innerHTML=k)},m(u,y){i(u,r,y)},p:ft,d(u){u&&s(r)}}}function Mt(se){let r,k,u,y,G,ne,H,qe=`<strong>Giskard</strong> is an AI model quality testing toolkit for LLMs, tabular, and NLP models. It consists of an open-source Python
library for scanning and testing AI models and an AI Model Quality Testing app, which can now be deployed using Hugging Face’s
Docker Spaces. Extending the features of the open-source library, the AI Model Quality Testing app enables you to:`,ae,_,Be="<li><p>Debug tests to diagnose your issues</p></li> <li><p>Create domain-specific tests thanks to automatic model insights</p></li> <li><p>Compare models to decide which model to promote</p></li> <li><p>Collect business feedback of your model results</p></li> <li><p>Share your results with your colleagues for alignment</p></li> <li><p>Store all your QA objects (tests, data slices, evaluation criteria, etc.) in one place to work more efficiently</p></li>",le,L,Re=`Visit <a href="https://docs.giskard.ai/" rel="nofollow">Giskard’s documentation</a> and <a href="https://docs.giskard.ai/en/latest/getting_started/quickstart/index.html" rel="nofollow">Quickstart Guides</a>
to learn how to use the full range of tools provided by Giskard.`,oe,j,Qe=`In the next sections, you’ll learn to deploy your own Giskard AI Model Quality Testing app and use it right from
Hugging Face Spaces. This Giskard app is a <strong>self-contained application completely hosted on Spaces using Docker</strong>.`,re,S,pe,P,De="You can deploy Giskard on Spaces with just a few clicks:",ue,$,Ve='<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/deploy-to-spaces-lg.svg"/>',de,v,ce,I,Xe=`You need to define the <strong>Owner</strong> (your personal account or an organization), a <strong>Space name</strong>, and the <strong>Visibility</strong>.
If you don’t want to publicly share your models and quality tests, set your Space to <strong>Private</strong>.`,fe,w,Ye='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-giskard-new-space.png"/>',me,A,ze=`Once you have created the Space, you’ll see the <code>Building</code> status. Once it becomes <code>Running</code>, your Space is ready to go.
If you don’t see a change in the screen, refresh the page.`,ge,U,he,J,Ze=`Once your Giskard Space is up and running, you’ll need to request a free license to start using the app.
You will then automatically receive an email with the license file.`,ke,T,We='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-giskard-free-license.png"/>',ye,F,$e,E,Ne="Once inside the app, start by creating a new project from the welcome screen.",ve,M,Oe='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-giskard-create-project.png"/>',we,q,Te,B,Ke=`The Giskard API key is used to establish communication between the environment where your AI models are running and
the Giskard app on Hugging Face Spaces. If you’ve set the <strong>Visibility</strong> of your Space to <strong>Private</strong>, you will need to provide a Hugging Face
user access token to generate the Hugging Face Giskard Space Token and establish a communication for access to your private Space. To do so, follow the instructions
displayed in the settings page of the Giskard app.`,Me,b,et='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-giskard-access-token.png"/>',be,R,xe,Q,tt=`Giskard executes your model using a worker that runs the model directly in your Python environment, with all the
dependencies required by your model. You can either execute the ML worker:`,Ce,D,st="<li><p>From your local notebook within the kernel that contains all the dependencies of your model</p></li> <li><p>From Google Colab within the kernel that contains all the dependencies of your model</p></li> <li><p>Or from your terminal within the Python environment that contains all the dependencies of your model</p></li>",Ge,V,it="Simply run the following command within the Python environment that contains all the dependencies of your model:",He,X,_e,Y,Le,z,nt=`In order to start building quality tests for a project, you will need to upload model and dataset objects, and either create or
upload a test suite from the Giskard Python library.`,je,x,Se,Z,at=`These actions will all require a connection between your Python environment and
the Giskard Space. Achieve this by initializing a Giskard Client: simply copy the “Create a Giskard Client” snippet
from the settings page of the Giskard app and run it within your Python environment. This will look something like this:`,Pe,W,Ie,N,lt='If you run into issues, head over to Giskard’s <a href="https://docs.giskard.ai/en/latest/giskard_hub/upload/index.html" rel="nofollow">upload object documentation page</a>.',Ae,O,Ue,K,ot='If you have suggestions or need specific support, please join <a href="https://discord.com/invite/ABvfpbu69R" rel="nofollow">Giskard’s Discord community</a> or reach out on <a href="https://github.com/Giskard-AI/giskard" rel="nofollow">Giskard’s GitHub repository</a>.',Je,ee,Fe,ie,Ee;return G=new C({props:{title:"Giskard on Spaces",local:"giskard-on-spaces",headingTag:"h1"}}),S=new C({props:{title:"Deploy Giskard on Spaces",local:"deploy-giskard-on-spaces",headingTag:"h2"}}),v=new dt({props:{warning:!0,$$slots:{default:[wt]},$$scope:{ctx:se}}}),U=new C({props:{title:"Request a free license",local:"request-a-free-license",headingTag:"h2"}}),F=new C({props:{title:"Create a new Giskard project",local:"create-a-new-giskard-project",headingTag:"h2"}}),q=new C({props:{title:"Generate a Hugging Face Giskard Space Token and Giskard API key",local:"generate-a-hugging-face-giskard-space-token-and-giskard-api-key",headingTag:"h2"}}),R=new C({props:{title:"Start the ML worker",local:"start-the-ml-worker",headingTag:"h2"}}),X=new ct({props:{code:"Z2lza2FyZCUyMHdvcmtlciUyMHN0YXJ0JTIwLWQlMjAtayUyMEdJU0tBUkQtQVBJLUtFWSUyMC11JTIwaHR0cHMlM0ElMkYlMkZYWFguaGYuc3BhY2UlMjAtLWhmLXRva2VuJTIwR0lTS0FSRC1TUEFDRS1UT0tFTg==",highlighted:"giskard worker start -d -k GISKARD-API-KEY -u https://XXX.hf.space --hf-token GISKARD-SPACE-TOKEN",wrap:!1}}),Y=new C({props:{title:"Upload your test suite, models and datasets",local:"upload-your-test-suite-models-and-datasets",headingTag:"h2"}}),x=new dt({props:{$$slots:{default:[Tt]},$$scope:{ctx:se}}}),W=new ct({props:{code:"ZnJvbSUyMGdpc2thcmQlMjBpbXBvcnQlMjBHaXNrYXJkQ2xpZW50JTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZ1c2VyX25hbWUtc3BhY2VfbmFtZS5oZi5zcGFjZSUyMiUwQWFwaV9rZXklMjAlM0QlMjAlMjJnc2steHh4JTIyJTBBaGZfdG9rZW4lMjAlM0QlMjAlMjJ4eHglMjIlMEElMEElMjMlMjBDcmVhdGUlMjBhJTIwZ2lza2FyZCUyMGNsaWVudCUyMHRvJTIwY29tbXVuaWNhdGUlMjB3aXRoJTIwR2lza2FyZCUwQWNsaWVudCUyMCUzRCUyMEdpc2thcmRDbGllbnQodXJsJTJDJTIwYXBpX2tleSUyQyUyMGhmX3Rva2VuKQ==",highlighted:`<span class="hljs-keyword">from</span> giskard <span class="hljs-keyword">import</span> GiskardClient

url = <span class="hljs-string">&quot;https://user_name-space_name.hf.space&quot;</span>
api_key = <span class="hljs-string">&quot;gsk-xxx&quot;</span>
hf_token = <span class="hljs-string">&quot;xxx&quot;</span>

<span class="hljs-comment"># Create a giskard client to communicate with Giskard</span>
client = GiskardClient(url, api_key, hf_token)`,wrap:!1}}),O=new C({props:{title:"Feedback and support",local:"feedback-and-support",headingTag:"h2"}}),ee=new vt({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/spaces-sdks-docker-giskard.md"}}),{c(){r=l("meta"),k=n(),u=l("p"),y=n(),d(G.$$.fragment),ne=n(),H=l("p"),H.innerHTML=qe,ae=n(),_=l("ul"),_.innerHTML=Be,le=n(),L=l("p"),L.innerHTML=Re,oe=n(),j=l("p"),j.innerHTML=Qe,re=n(),d(S.$$.fragment),pe=n(),P=l("p"),P.textContent=De,ue=n(),$=l("a"),$.innerHTML=Ve,de=n(),d(v.$$.fragment),ce=n(),I=l("p"),I.innerHTML=Xe,fe=n(),w=l("div"),w.innerHTML=Ye,me=n(),A=l("p"),A.innerHTML=ze,ge=n(),d(U.$$.fragment),he=n(),J=l("p"),J.textContent=Ze,ke=n(),T=l("div"),T.innerHTML=We,ye=n(),d(F.$$.fragment),$e=n(),E=l("p"),E.textContent=Ne,ve=n(),M=l("div"),M.innerHTML=Oe,we=n(),d(q.$$.fragment),Te=n(),B=l("p"),B.innerHTML=Ke,Me=n(),b=l("div"),b.innerHTML=et,be=n(),d(R.$$.fragment),xe=n(),Q=l("p"),Q.textContent=tt,Ce=n(),D=l("ul"),D.innerHTML=st,Ge=n(),V=l("p"),V.textContent=it,He=n(),d(X.$$.fragment),_e=n(),d(Y.$$.fragment),Le=n(),z=l("p"),z.textContent=nt,je=n(),d(x.$$.fragment),Se=n(),Z=l("p"),Z.textContent=at,Pe=n(),d(W.$$.fragment),Ie=n(),N=l("p"),N.innerHTML=lt,Ae=n(),d(O.$$.fragment),Ue=n(),K=l("p"),K.innerHTML=ot,Je=n(),d(ee.$$.fragment),Fe=n(),ie=l("p"),this.h()},l(e){const t=yt("svelte-u9bgzb",document.head);r=o(t,"META",{name:!0,content:!0}),t.forEach(s),k=a(e),u=o(e,"P",{}),ut(u).forEach(s),y=a(e),c(G.$$.fragment,e),ne=a(e),H=o(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-175osbi"&&(H.innerHTML=qe),ae=a(e),_=o(e,"UL",{"data-svelte-h":!0}),p(_)!=="svelte-1k78dq1"&&(_.innerHTML=Be),le=a(e),L=o(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-1s4zvig"&&(L.innerHTML=Re),oe=a(e),j=o(e,"P",{"data-svelte-h":!0}),p(j)!=="svelte-xlg2t3"&&(j.innerHTML=Qe),re=a(e),c(S.$$.fragment,e),pe=a(e),P=o(e,"P",{"data-svelte-h":!0}),p(P)!=="svelte-rllajf"&&(P.textContent=De),ue=a(e),$=o(e,"A",{href:!0,"data-svelte-h":!0}),p($)!=="svelte-ahttk"&&($.innerHTML=Ve),de=a(e),c(v.$$.fragment,e),ce=a(e),I=o(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-164g36g"&&(I.innerHTML=Xe),fe=a(e),w=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(w)!=="svelte-1hoz8gw"&&(w.innerHTML=Ye),me=a(e),A=o(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-1nhubu"&&(A.innerHTML=ze),ge=a(e),c(U.$$.fragment,e),he=a(e),J=o(e,"P",{"data-svelte-h":!0}),p(J)!=="svelte-1vxqely"&&(J.textContent=Ze),ke=a(e),T=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(T)!=="svelte-1s1xz3l"&&(T.innerHTML=We),ye=a(e),c(F.$$.fragment,e),$e=a(e),E=o(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-1gn0vea"&&(E.textContent=Ne),ve=a(e),M=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(M)!=="svelte-12fffop"&&(M.innerHTML=Oe),we=a(e),c(q.$$.fragment,e),Te=a(e),B=o(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-12o7it6"&&(B.innerHTML=Ke),Me=a(e),b=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(b)!=="svelte-pydij"&&(b.innerHTML=et),be=a(e),c(R.$$.fragment,e),xe=a(e),Q=o(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-m8i1d6"&&(Q.textContent=tt),Ce=a(e),D=o(e,"UL",{"data-svelte-h":!0}),p(D)!=="svelte-zbmpxo"&&(D.innerHTML=st),Ge=a(e),V=o(e,"P",{"data-svelte-h":!0}),p(V)!=="svelte-pw3b33"&&(V.textContent=it),He=a(e),c(X.$$.fragment,e),_e=a(e),c(Y.$$.fragment,e),Le=a(e),z=o(e,"P",{"data-svelte-h":!0}),p(z)!=="svelte-1d1kbpu"&&(z.textContent=nt),je=a(e),c(x.$$.fragment,e),Se=a(e),Z=o(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-1dyykzi"&&(Z.textContent=at),Pe=a(e),c(W.$$.fragment,e),Ie=a(e),N=o(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-rbdbwo"&&(N.innerHTML=lt),Ae=a(e),c(O.$$.fragment,e),Ue=a(e),K=o(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-mqry0k"&&(K.innerHTML=ot),Je=a(e),c(ee.$$.fragment,e),Fe=a(e),ie=o(e,"P",{}),ut(ie).forEach(s),this.h()},h(){te(r,"name","hf:doc:metadata"),te(r,"content",bt),te($,"href","https://huggingface.co/new-space?template=giskardai%2Fgiskard"),te(w,"class","flex justify-center"),te(T,"class","flex justify-center"),te(M,"class","flex justify-center"),te(b,"class","flex justify-center")},m(e,t){$t(document.head,r),i(e,k,t),i(e,u,t),i(e,y,t),f(G,e,t),i(e,ne,t),i(e,H,t),i(e,ae,t),i(e,_,t),i(e,le,t),i(e,L,t),i(e,oe,t),i(e,j,t),i(e,re,t),f(S,e,t),i(e,pe,t),i(e,P,t),i(e,ue,t),i(e,$,t),i(e,de,t),f(v,e,t),i(e,ce,t),i(e,I,t),i(e,fe,t),i(e,w,t),i(e,me,t),i(e,A,t),i(e,ge,t),f(U,e,t),i(e,he,t),i(e,J,t),i(e,ke,t),i(e,T,t),i(e,ye,t),f(F,e,t),i(e,$e,t),i(e,E,t),i(e,ve,t),i(e,M,t),i(e,we,t),f(q,e,t),i(e,Te,t),i(e,B,t),i(e,Me,t),i(e,b,t),i(e,be,t),f(R,e,t),i(e,xe,t),i(e,Q,t),i(e,Ce,t),i(e,D,t),i(e,Ge,t),i(e,V,t),i(e,He,t),f(X,e,t),i(e,_e,t),f(Y,e,t),i(e,Le,t),i(e,z,t),i(e,je,t),f(x,e,t),i(e,Se,t),i(e,Z,t),i(e,Pe,t),f(W,e,t),i(e,Ie,t),i(e,N,t),i(e,Ae,t),f(O,e,t),i(e,Ue,t),i(e,K,t),i(e,Je,t),f(ee,e,t),i(e,Fe,t),i(e,ie,t),Ee=!0},p(e,[t]){const rt={};t&2&&(rt.$$scope={dirty:t,ctx:e}),v.$set(rt);const pt={};t&2&&(pt.$$scope={dirty:t,ctx:e}),x.$set(pt)},i(e){Ee||(m(G.$$.fragment,e),m(S.$$.fragment,e),m(v.$$.fragment,e),m(U.$$.fragment,e),m(F.$$.fragment,e),m(q.$$.fragment,e),m(R.$$.fragment,e),m(X.$$.fragment,e),m(Y.$$.fragment,e),m(x.$$.fragment,e),m(W.$$.fragment,e),m(O.$$.fragment,e),m(ee.$$.fragment,e),Ee=!0)},o(e){g(G.$$.fragment,e),g(S.$$.fragment,e),g(v.$$.fragment,e),g(U.$$.fragment,e),g(F.$$.fragment,e),g(q.$$.fragment,e),g(R.$$.fragment,e),g(X.$$.fragment,e),g(Y.$$.fragment,e),g(x.$$.fragment,e),g(W.$$.fragment,e),g(O.$$.fragment,e),g(ee.$$.fragment,e),Ee=!1},d(e){e&&(s(k),s(u),s(y),s(ne),s(H),s(ae),s(_),s(le),s(L),s(oe),s(j),s(re),s(pe),s(P),s(ue),s($),s(de),s(ce),s(I),s(fe),s(w),s(me),s(A),s(ge),s(he),s(J),s(ke),s(T),s(ye),s($e),s(E),s(ve),s(M),s(we),s(Te),s(B),s(Me),s(b),s(be),s(xe),s(Q),s(Ce),s(D),s(Ge),s(V),s(He),s(_e),s(Le),s(z),s(je),s(Se),s(Z),s(Pe),s(Ie),s(N),s(Ae),s(Ue),s(K),s(Je),s(Fe),s(ie)),s(r),h(G,e),h(S,e),h(v,e),h(U,e),h(F,e),h(q,e),h(R,e),h(X,e),h(Y,e),h(x,e),h(W,e),h(O,e),h(ee,e)}}}const bt='{"title":"Giskard on Spaces","local":"giskard-on-spaces","sections":[{"title":"Deploy Giskard on Spaces","local":"deploy-giskard-on-spaces","sections":[],"depth":2},{"title":"Request a free license","local":"request-a-free-license","sections":[],"depth":2},{"title":"Create a new Giskard project","local":"create-a-new-giskard-project","sections":[],"depth":2},{"title":"Generate a Hugging Face Giskard Space Token and Giskard API key","local":"generate-a-hugging-face-giskard-space-token-and-giskard-api-key","sections":[],"depth":2},{"title":"Start the ML worker","local":"start-the-ml-worker","sections":[],"depth":2},{"title":"Upload your test suite, models and datasets","local":"upload-your-test-suite-models-and-datasets","sections":[],"depth":2},{"title":"Feedback and support","local":"feedback-and-support","sections":[],"depth":2}],"depth":1}';function xt(se){return gt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class jt extends ht{constructor(r){super(),kt(this,r,xt,Mt,mt,{})}}export{jt as component};
