import{s as pe,y as X,n as me,o as fe}from"../chunks/scheduler.d6170356.js";import{S as de,i as _e,g as s,s as i,r as j,A as ye,h as l,f as a,c as o,j as he,u as J,x as r,k as x,y as ve,a as n,v as K,d as Q,t as V,w as W}from"../chunks/index.fcd4cc08.js";import{H as Z,E as we}from"../chunks/EditOnGithub.da2b595c.js";function $e(ee){let c,k,M,L,g,P,h,te="<strong>Hugging Chat</strong> is an open-source interface enabling everyone to try open-source large language models such as Falcon, StarCoder, and BLOOM. Thanks to an official Docker template called ChatUI, you can deploy your own Hugging Chat based on a model of your choice with a few clicks using Hugging Face’s infrastructure.",S,p,I,m,ae='To get started, simply head <a href="https://huggingface.co/new-space?template=huggingchat/chat-ui-template" rel="nofollow">here</a>. In the backend of this application, <a href="https://github.com/huggingface/text-generation-inference" rel="nofollow">text-generation-inference</a> is used for better optimized model inference. Since these models can’t run on CPUs, you can select the GPU depending on your choice of model.',U,u,ne='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_landing.png"/>',q,f,ie=`You should provide a MongoDB endpoint where your chats will be written. If you leave this section blank, your logs will be persisted to a database inside the Space. Note that Hugging Face does not have access to your chats. You can configure the name and the theme of the Space by providing the application name and application color parameters.
Below this, you can select the Hugging Face Hub ID of the model you wish to serve. You can also change the generation hyperparameters in the dictionary below in JSON format.`,E,d,oe='<em>Note</em>: If you’d like to deploy a model with gated access or a model in a private repository, you can simply provide <code>HF_TOKEN</code> in repository secrets. You need to set its value to an access token you can get from <a href="https://huggingface.co/settings/tokens" rel="nofollow">here</a>.',G,b,se,O,_,le="Once the creation is complete, you will see <code>Building</code> on your Space. Once built, you can try your own HuggingChat!",D,H,ce,F,y,ue="Start chatting!",z,C,re,B,v,N,w,ge='<li><a href="https://huggingface.co/docs/hub/spaces-sdks-docker" rel="nofollow">HF Docker Spaces</a></li> <li><a href="https://github.com/huggingface/chat-ui" rel="nofollow">chat-ui GitHub Repository</a></li> <li><a href="https://github.com/huggingface/text-generation-inference" rel="nofollow">text-generation-inference GitHub repository</a></li>',R,$,Y,T,A;return g=new Z({props:{title:"ChatUI on Spaces",local:"chatui-on-spaces",headingTag:"h1"}}),p=new Z({props:{title:"Deploy your own Chat UI",local:"deploy-your-own-chat-ui",headingTag:"h2"}}),v=new Z({props:{title:"Read more",local:"read-more",headingTag:"h2"}}),$=new we({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/spaces-sdks-docker-chatui.md"}}),{c(){c=s("meta"),k=i(),M=s("p"),L=i(),j(g.$$.fragment),P=i(),h=s("p"),h.innerHTML=te,S=i(),j(p.$$.fragment),I=i(),m=s("p"),m.innerHTML=ae,U=i(),u=s("a"),u.innerHTML=ne,q=i(),f=s("p"),f.textContent=ie,E=i(),d=s("p"),d.innerHTML=oe,G=i(),b=s("img"),O=i(),_=s("p"),_.innerHTML=le,D=i(),H=s("img"),F=i(),y=s("p"),y.textContent=ue,z=i(),C=s("img"),B=i(),j(v.$$.fragment),N=i(),w=s("ul"),w.innerHTML=ge,R=i(),j($.$$.fragment),Y=i(),T=s("p"),this.h()},l(e){const t=ye("svelte-u9bgzb",document.head);c=l(t,"META",{name:!0,content:!0}),t.forEach(a),k=o(e),M=l(e,"P",{}),he(M).forEach(a),L=o(e),J(g.$$.fragment,e),P=o(e),h=l(e,"P",{"data-svelte-h":!0}),r(h)!=="svelte-b0g75s"&&(h.innerHTML=te),S=o(e),J(p.$$.fragment,e),I=o(e),m=l(e,"P",{"data-svelte-h":!0}),r(m)!=="svelte-6en2ro"&&(m.innerHTML=ae),U=o(e),u=l(e,"A",{href:!0,"data-svelte-h":!0}),r(u)!=="svelte-1u1qq9q"&&(u.innerHTML=ne),q=o(e),f=l(e,"P",{"data-svelte-h":!0}),r(f)!=="svelte-s974lz"&&(f.textContent=ie),E=o(e),d=l(e,"P",{"data-svelte-h":!0}),r(d)!=="svelte-12qzdej"&&(d.innerHTML=oe),G=o(e),b=l(e,"IMG",{src:!0}),O=o(e),_=l(e,"P",{"data-svelte-h":!0}),r(_)!=="svelte-ugq1vl"&&(_.innerHTML=le),D=o(e),H=l(e,"IMG",{src:!0}),F=o(e),y=l(e,"P",{"data-svelte-h":!0}),r(y)!=="svelte-1xle12d"&&(y.textContent=ue),z=o(e),C=l(e,"IMG",{src:!0}),B=o(e),J(v.$$.fragment,e),N=o(e),w=l(e,"UL",{"data-svelte-h":!0}),r(w)!=="svelte-siv5yt"&&(w.innerHTML=ge),R=o(e),J($.$$.fragment,e),Y=o(e),T=l(e,"P",{}),he(T).forEach(a),this.h()},h(){x(c,"name","hf:doc:metadata"),x(c,"content",be),x(u,"href","https://huggingface.co/new-space?template=huggingchat/chat-ui-template"),X(b.src,se="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_params.png")||x(b,"src",se),X(H.src,ce="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_ui.png")||x(H,"src",ce),X(C.src,re="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_chat.png")||x(C,"src",re)},m(e,t){ve(document.head,c),n(e,k,t),n(e,M,t),n(e,L,t),K(g,e,t),n(e,P,t),n(e,h,t),n(e,S,t),K(p,e,t),n(e,I,t),n(e,m,t),n(e,U,t),n(e,u,t),n(e,q,t),n(e,f,t),n(e,E,t),n(e,d,t),n(e,G,t),n(e,b,t),n(e,O,t),n(e,_,t),n(e,D,t),n(e,H,t),n(e,F,t),n(e,y,t),n(e,z,t),n(e,C,t),n(e,B,t),K(v,e,t),n(e,N,t),n(e,w,t),n(e,R,t),K($,e,t),n(e,Y,t),n(e,T,t),A=!0},p:me,i(e){A||(Q(g.$$.fragment,e),Q(p.$$.fragment,e),Q(v.$$.fragment,e),Q($.$$.fragment,e),A=!0)},o(e){V(g.$$.fragment,e),V(p.$$.fragment,e),V(v.$$.fragment,e),V($.$$.fragment,e),A=!1},d(e){e&&(a(k),a(M),a(L),a(P),a(h),a(S),a(I),a(m),a(U),a(u),a(q),a(f),a(E),a(d),a(G),a(b),a(O),a(_),a(D),a(H),a(F),a(y),a(z),a(C),a(B),a(N),a(w),a(R),a(Y),a(T)),a(c),W(g,e),W(p,e),W(v,e),W($,e)}}}const be='{"title":"ChatUI on Spaces","local":"chatui-on-spaces","sections":[{"title":"Deploy your own Chat UI","local":"deploy-your-own-chat-ui","sections":[],"depth":2},{"title":"Read more","local":"read-more","sections":[],"depth":2}],"depth":1}';function He(ee){return fe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Te extends de{constructor(c){super(),_e(this,c,He,$e,pe,{})}}export{Te as component};
