import{s as ct,o as ft,n as dt}from"../chunks/scheduler.d6170356.js";import{S as mt,i as gt,g as l,s as a,r as d,A as ht,h as o,f as s,c as i,j as rt,u as c,x as p,k as ee,y as kt,a as n,v as f,d as m,t as g,w as h}from"../chunks/index.fcd4cc08.js";import{T as pt}from"../chunks/Tip.b09c67cf.js";import{C as ut}from"../chunks/CodeBlock.7b16bdef.js";import{H as b}from"../chunks/Heading.8660bd0e.js";function yt(te){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){n(u,r,y)},p:dt,d(u){u&&s(r)}}}function $t(te){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){n(u,r,y)},p:dt,d(u){u&&s(r)}}}function vt(te){let r,k,u,y,G,ne,H,Fe=`<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,_,qe="<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>",ie,L,Ee=`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.`,le,j,Be=`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>.`,oe,S,re,P,Re="You can deploy Giskard on Spaces with just a few clicks:",pe,$,Qe='<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/deploy-to-spaces-lg.svg"/>',ue,v,de,I,De=`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>.`,ce,w,Ve='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-giskard-new-space.png"/>',fe,A,Xe=`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.`,me,U,ge,J,Ye=`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.`,he,T,ze='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-giskard-free-license.png"/>',ke,F,ye,q,Ze="Once inside the app, start by creating a new project from the welcome screen.",$e,M,We='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-giskard-create-project.png"/>',ve,E,we,B,Ne=`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.`,Te,x,Oe='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-giskard-access-token.png"/>',Me,R,xe,Q,Ke=`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,et="<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>",be,V,tt="Simply run the following command within the Python environment that contains all the dependencies of your model:",Ge,X,He,Y,_e,z,st=`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.`,Le,C,je,Z,nt=`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:`,Se,W,Pe,N,at='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>.',Ie,O,Ae,K,it='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>.',Ue,se,Je;return G=new b({props:{title:"Giskard on Spaces",local:"giskard-on-spaces",headingTag:"h1"}}),S=new b({props:{title:"Deploy Giskard on Spaces",local:"deploy-giskard-on-spaces",headingTag:"h2"}}),v=new pt({props:{warning:!0,$$slots:{default:[yt]},$$scope:{ctx:te}}}),U=new b({props:{title:"Request a free license",local:"request-a-free-license",headingTag:"h2"}}),F=new b({props:{title:"Create a new Giskard project",local:"create-a-new-giskard-project",headingTag:"h2"}}),E=new b({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 b({props:{title:"Start the ML worker",local:"start-the-ml-worker",headingTag:"h2"}}),X=new ut({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 b({props:{title:"Upload your test suite, models and datasets",local:"upload-your-test-suite-models-and-datasets",headingTag:"h2"}}),C=new pt({props:{$$slots:{default:[$t]},$$scope:{ctx:te}}}),W=new ut({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 b({props:{title:"Feedback and support",local:"feedback-and-support",headingTag:"h2"}}),{c(){r=l("meta"),k=a(),u=l("p"),y=a(),d(G.$$.fragment),ne=a(),H=l("p"),H.innerHTML=Fe,ae=a(),_=l("ul"),_.innerHTML=qe,ie=a(),L=l("p"),L.innerHTML=Ee,le=a(),j=l("p"),j.innerHTML=Be,oe=a(),d(S.$$.fragment),re=a(),P=l("p"),P.textContent=Re,pe=a(),$=l("a"),$.innerHTML=Qe,ue=a(),d(v.$$.fragment),de=a(),I=l("p"),I.innerHTML=De,ce=a(),w=l("div"),w.innerHTML=Ve,fe=a(),A=l("p"),A.innerHTML=Xe,me=a(),d(U.$$.fragment),ge=a(),J=l("p"),J.textContent=Ye,he=a(),T=l("div"),T.innerHTML=ze,ke=a(),d(F.$$.fragment),ye=a(),q=l("p"),q.textContent=Ze,$e=a(),M=l("div"),M.innerHTML=We,ve=a(),d(E.$$.fragment),we=a(),B=l("p"),B.innerHTML=Ne,Te=a(),x=l("div"),x.innerHTML=Oe,Me=a(),d(R.$$.fragment),xe=a(),Q=l("p"),Q.textContent=Ke,Ce=a(),D=l("ul"),D.innerHTML=et,be=a(),V=l("p"),V.textContent=tt,Ge=a(),d(X.$$.fragment),He=a(),d(Y.$$.fragment),_e=a(),z=l("p"),z.textContent=st,Le=a(),d(C.$$.fragment),je=a(),Z=l("p"),Z.textContent=nt,Se=a(),d(W.$$.fragment),Pe=a(),N=l("p"),N.innerHTML=at,Ie=a(),d(O.$$.fragment),Ae=a(),K=l("p"),K.innerHTML=it,Ue=a(),se=l("p"),this.h()},l(e){const t=ht("svelte-u9bgzb",document.head);r=o(t,"META",{name:!0,content:!0}),t.forEach(s),k=i(e),u=o(e,"P",{}),rt(u).forEach(s),y=i(e),c(G.$$.fragment,e),ne=i(e),H=o(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-175osbi"&&(H.innerHTML=Fe),ae=i(e),_=o(e,"UL",{"data-svelte-h":!0}),p(_)!=="svelte-1k78dq1"&&(_.innerHTML=qe),ie=i(e),L=o(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-1s4zvig"&&(L.innerHTML=Ee),le=i(e),j=o(e,"P",{"data-svelte-h":!0}),p(j)!=="svelte-xlg2t3"&&(j.innerHTML=Be),oe=i(e),c(S.$$.fragment,e),re=i(e),P=o(e,"P",{"data-svelte-h":!0}),p(P)!=="svelte-rllajf"&&(P.textContent=Re),pe=i(e),$=o(e,"A",{href:!0,"data-svelte-h":!0}),p($)!=="svelte-ahttk"&&($.innerHTML=Qe),ue=i(e),c(v.$$.fragment,e),de=i(e),I=o(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-164g36g"&&(I.innerHTML=De),ce=i(e),w=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(w)!=="svelte-1hoz8gw"&&(w.innerHTML=Ve),fe=i(e),A=o(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-1nhubu"&&(A.innerHTML=Xe),me=i(e),c(U.$$.fragment,e),ge=i(e),J=o(e,"P",{"data-svelte-h":!0}),p(J)!=="svelte-1vxqely"&&(J.textContent=Ye),he=i(e),T=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(T)!=="svelte-1s1xz3l"&&(T.innerHTML=ze),ke=i(e),c(F.$$.fragment,e),ye=i(e),q=o(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-1gn0vea"&&(q.textContent=Ze),$e=i(e),M=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(M)!=="svelte-12fffop"&&(M.innerHTML=We),ve=i(e),c(E.$$.fragment,e),we=i(e),B=o(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-12o7it6"&&(B.innerHTML=Ne),Te=i(e),x=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(x)!=="svelte-pydij"&&(x.innerHTML=Oe),Me=i(e),c(R.$$.fragment,e),xe=i(e),Q=o(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-m8i1d6"&&(Q.textContent=Ke),Ce=i(e),D=o(e,"UL",{"data-svelte-h":!0}),p(D)!=="svelte-zbmpxo"&&(D.innerHTML=et),be=i(e),V=o(e,"P",{"data-svelte-h":!0}),p(V)!=="svelte-pw3b33"&&(V.textContent=tt),Ge=i(e),c(X.$$.fragment,e),He=i(e),c(Y.$$.fragment,e),_e=i(e),z=o(e,"P",{"data-svelte-h":!0}),p(z)!=="svelte-1d1kbpu"&&(z.textContent=st),Le=i(e),c(C.$$.fragment,e),je=i(e),Z=o(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-1dyykzi"&&(Z.textContent=nt),Se=i(e),c(W.$$.fragment,e),Pe=i(e),N=o(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-rbdbwo"&&(N.innerHTML=at),Ie=i(e),c(O.$$.fragment,e),Ae=i(e),K=o(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-mqry0k"&&(K.innerHTML=it),Ue=i(e),se=o(e,"P",{}),rt(se).forEach(s),this.h()},h(){ee(r,"name","hf:doc:metadata"),ee(r,"content",wt),ee($,"href","https://huggingface.co/new-space?template=giskardai%2Fgiskard"),ee(w,"class","flex justify-center"),ee(T,"class","flex justify-center"),ee(M,"class","flex justify-center"),ee(x,"class","flex justify-center")},m(e,t){kt(document.head,r),n(e,k,t),n(e,u,t),n(e,y,t),f(G,e,t),n(e,ne,t),n(e,H,t),n(e,ae,t),n(e,_,t),n(e,ie,t),n(e,L,t),n(e,le,t),n(e,j,t),n(e,oe,t),f(S,e,t),n(e,re,t),n(e,P,t),n(e,pe,t),n(e,$,t),n(e,ue,t),f(v,e,t),n(e,de,t),n(e,I,t),n(e,ce,t),n(e,w,t),n(e,fe,t),n(e,A,t),n(e,me,t),f(U,e,t),n(e,ge,t),n(e,J,t),n(e,he,t),n(e,T,t),n(e,ke,t),f(F,e,t),n(e,ye,t),n(e,q,t),n(e,$e,t),n(e,M,t),n(e,ve,t),f(E,e,t),n(e,we,t),n(e,B,t),n(e,Te,t),n(e,x,t),n(e,Me,t),f(R,e,t),n(e,xe,t),n(e,Q,t),n(e,Ce,t),n(e,D,t),n(e,be,t),n(e,V,t),n(e,Ge,t),f(X,e,t),n(e,He,t),f(Y,e,t),n(e,_e,t),n(e,z,t),n(e,Le,t),f(C,e,t),n(e,je,t),n(e,Z,t),n(e,Se,t),f(W,e,t),n(e,Pe,t),n(e,N,t),n(e,Ie,t),f(O,e,t),n(e,Ae,t),n(e,K,t),n(e,Ue,t),n(e,se,t),Je=!0},p(e,[t]){const lt={};t&2&&(lt.$$scope={dirty:t,ctx:e}),v.$set(lt);const ot={};t&2&&(ot.$$scope={dirty:t,ctx:e}),C.$set(ot)},i(e){Je||(m(G.$$.fragment,e),m(S.$$.fragment,e),m(v.$$.fragment,e),m(U.$$.fragment,e),m(F.$$.fragment,e),m(E.$$.fragment,e),m(R.$$.fragment,e),m(X.$$.fragment,e),m(Y.$$.fragment,e),m(C.$$.fragment,e),m(W.$$.fragment,e),m(O.$$.fragment,e),Je=!0)},o(e){g(G.$$.fragment,e),g(S.$$.fragment,e),g(v.$$.fragment,e),g(U.$$.fragment,e),g(F.$$.fragment,e),g(E.$$.fragment,e),g(R.$$.fragment,e),g(X.$$.fragment,e),g(Y.$$.fragment,e),g(C.$$.fragment,e),g(W.$$.fragment,e),g(O.$$.fragment,e),Je=!1},d(e){e&&(s(k),s(u),s(y),s(ne),s(H),s(ae),s(_),s(ie),s(L),s(le),s(j),s(oe),s(re),s(P),s(pe),s($),s(ue),s(de),s(I),s(ce),s(w),s(fe),s(A),s(me),s(ge),s(J),s(he),s(T),s(ke),s(ye),s(q),s($e),s(M),s(ve),s(we),s(B),s(Te),s(x),s(Me),s(xe),s(Q),s(Ce),s(D),s(be),s(V),s(Ge),s(He),s(_e),s(z),s(Le),s(je),s(Z),s(Se),s(Pe),s(N),s(Ie),s(Ae),s(K),s(Ue),s(se)),s(r),h(G,e),h(S,e),h(v,e),h(U,e),h(F,e),h(E,e),h(R,e),h(X,e),h(Y,e),h(C,e),h(W,e),h(O,e)}}}const wt='{"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 Tt(te){return ft(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ht extends mt{constructor(r){super(),gt(this,r,Tt,vt,ct,{})}}export{Ht as component};
