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