import{S as re,i as le,s as ie,e as r,k as P,w as ce,t as n,N as pe,c as l,d as a,m as $,a as i,x as de,h as s,b as u,G as t,g as v,y as he,L as fe,q as me,o as ue,B as ve,v as _e}from"../chunks/vendor-hf-doc-builder.js";import{I as ye}from"../chunks/IconCopyLink-hf-doc-builder.js";function Ee(W){let d,k,h,f,S,_,T,g,V,b,E,N,D,o,U,x,L,j,w,M,B,C,H,J,O,R,z,I,m,F,y,K,Q,q;return _=new ye({}),{c(){d=r("meta"),k=P(),h=r("h1"),f=r("a"),S=r("span"),ce(_.$$.fragment),T=P(),g=r("span"),V=n("Using OpenCV in Spaces"),b=P(),E=r("p"),N=n("In order to use OpenCV in your Gradio or Streamlit Spaces, you\u2019ll need to make the Space install both the Python and Debian dependencies"),D=P(),o=r("p"),U=n("This means adding "),x=r("code"),L=n("python3-opencv"),j=n(" to the "),w=r("code"),M=n("packages.txt"),B=n(" file, and adding "),C=r("code"),H=n("opencv-python"),J=n(" to the "),O=r("code"),R=n("requirements.txt"),z=n(" file. If those files don\u2019t exist, you\u2019ll need to create them."),I=P(),m=r("p"),F=n("To see an example, "),y=r("a"),K=n("see this Gradio project"),Q=n("."),this.h()},l(e){const c=pe('[data-svelte="svelte-1phssyn"]',document.head);d=l(c,"META",{name:!0,content:!0}),c.forEach(a),k=$(e),h=l(e,"H1",{class:!0});var A=i(h);f=l(A,"A",{id:!0,class:!0,href:!0});var X=i(f);S=l(X,"SPAN",{});var Y=i(S);de(_.$$.fragment,Y),Y.forEach(a),X.forEach(a),T=$(A),g=l(A,"SPAN",{});var Z=i(g);V=s(Z,"Using OpenCV in Spaces"),Z.forEach(a),A.forEach(a),b=$(e),E=l(e,"P",{});var ee=i(E);N=s(ee,"In order to use OpenCV in your Gradio or Streamlit Spaces, you\u2019ll need to make the Space install both the Python and Debian dependencies"),ee.forEach(a),D=$(e),o=l(e,"P",{});var p=i(o);U=s(p,"This means adding "),x=l(p,"CODE",{});var te=i(x);L=s(te,"python3-opencv"),te.forEach(a),j=s(p," to the "),w=l(p,"CODE",{});var ae=i(w);M=s(ae,"packages.txt"),ae.forEach(a),B=s(p," file, and adding "),C=l(p,"CODE",{});var oe=i(C);H=s(oe,"opencv-python"),oe.forEach(a),J=s(p," to the "),O=l(p,"CODE",{});var ne=i(O);R=s(ne,"requirements.txt"),ne.forEach(a),z=s(p," file. If those files don\u2019t exist, you\u2019ll need to create them."),p.forEach(a),I=$(e),m=l(e,"P",{});var G=i(m);F=s(G,"To see an example, "),y=l(G,"A",{href:!0,rel:!0});var se=i(y);K=s(se,"see this Gradio project"),se.forEach(a),Q=s(G,"."),G.forEach(a),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(Se)),u(f,"id","using-opencv-in-spaces"),u(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(f,"href","#using-opencv-in-spaces"),u(h,"class","relative group"),u(y,"href","https://huggingface.co/spaces/templates/gradio_opencv/tree/main"),u(y,"rel","nofollow")},m(e,c){t(document.head,d),v(e,k,c),v(e,h,c),t(h,f),t(f,S),he(_,S,null),t(h,T),t(h,g),t(g,V),v(e,b,c),v(e,E,c),t(E,N),v(e,D,c),v(e,o,c),t(o,U),t(o,x),t(x,L),t(o,j),t(o,w),t(w,M),t(o,B),t(o,C),t(C,H),t(o,J),t(o,O),t(O,R),t(o,z),v(e,I,c),v(e,m,c),t(m,F),t(m,y),t(y,K),t(m,Q),q=!0},p:fe,i(e){q||(me(_.$$.fragment,e),q=!0)},o(e){ue(_.$$.fragment,e),q=!1},d(e){a(d),e&&a(k),e&&a(h),ve(_),e&&a(b),e&&a(E),e&&a(D),e&&a(o),e&&a(I),e&&a(m)}}}const Se={local:"using-opencv-in-spaces",title:"Using OpenCV in Spaces"};function ge(W){return _e(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ce extends re{constructor(d){super();le(this,d,ge,Ee,ie,{})}}export{Ce as default,Se as metadata};
