import{s as he,n as pe,o as fe}from"../chunks/scheduler.d6170356.js";import{S as me,i as de,g as s,s as i,r as j,A as ye,h as l,f as a,c as o,j as ge,u as J,x as c,k as x,y as _e,a as n,v as K,d as Q,t as V,w as W}from"../chunks/index.fcd4cc08.js";import{H as X,E as ve}from"../chunks/EditOnGithub.da2b595c.js";function we(Z){let r,M,T,k,f,P,m,ee="<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,d,I,y,te='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,ae='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_landing.png"/>',E,_,ne=`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.`,O,v,ie='<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>.',q,g,oe='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_params.png"/>',A,w,se="Once the creation is complete, you will see <code>Building</code> on your Space. Once built, you can try your own HuggingChat!",D,h,le='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_ui.png"/>',F,$,ce="Start chatting!",z,p,re='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_chat.png"/>',B,H,G,b,ue='<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>',N,C,R,L,Y;return f=new X({props:{title:"ChatUI on Spaces",local:"chatui-on-spaces",headingTag:"h1"}}),d=new X({props:{title:"Deploy your own Chat UI",local:"deploy-your-own-chat-ui",headingTag:"h2"}}),H=new X({props:{title:"Read more",local:"read-more",headingTag:"h2"}}),C=new ve({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/spaces-sdks-docker-chatui.md"}}),{c(){r=s("meta"),M=i(),T=s("p"),k=i(),j(f.$$.fragment),P=i(),m=s("p"),m.innerHTML=ee,S=i(),j(d.$$.fragment),I=i(),y=s("p"),y.innerHTML=te,U=i(),u=s("a"),u.innerHTML=ae,E=i(),_=s("p"),_.textContent=ne,O=i(),v=s("p"),v.innerHTML=ie,q=i(),g=s("a"),g.innerHTML=oe,A=i(),w=s("p"),w.innerHTML=se,D=i(),h=s("a"),h.innerHTML=le,F=i(),$=s("p"),$.textContent=ce,z=i(),p=s("a"),p.innerHTML=re,B=i(),j(H.$$.fragment),G=i(),b=s("ul"),b.innerHTML=ue,N=i(),j(C.$$.fragment),R=i(),L=s("p"),this.h()},l(e){const t=ye("svelte-u9bgzb",document.head);r=l(t,"META",{name:!0,content:!0}),t.forEach(a),M=o(e),T=l(e,"P",{}),ge(T).forEach(a),k=o(e),J(f.$$.fragment,e),P=o(e),m=l(e,"P",{"data-svelte-h":!0}),c(m)!=="svelte-b0g75s"&&(m.innerHTML=ee),S=o(e),J(d.$$.fragment,e),I=o(e),y=l(e,"P",{"data-svelte-h":!0}),c(y)!=="svelte-6en2ro"&&(y.innerHTML=te),U=o(e),u=l(e,"A",{href:!0,"data-svelte-h":!0}),c(u)!=="svelte-1u1qq9q"&&(u.innerHTML=ae),E=o(e),_=l(e,"P",{"data-svelte-h":!0}),c(_)!=="svelte-s974lz"&&(_.textContent=ne),O=o(e),v=l(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-12qzdej"&&(v.innerHTML=ie),q=o(e),g=l(e,"A",{href:!0,"data-svelte-h":!0}),c(g)!=="svelte-l6ewtc"&&(g.innerHTML=oe),A=o(e),w=l(e,"P",{"data-svelte-h":!0}),c(w)!=="svelte-ugq1vl"&&(w.innerHTML=se),D=o(e),h=l(e,"A",{href:!0,"data-svelte-h":!0}),c(h)!=="svelte-1pme8ls"&&(h.innerHTML=le),F=o(e),$=l(e,"P",{"data-svelte-h":!0}),c($)!=="svelte-1xle12d"&&($.textContent=ce),z=o(e),p=l(e,"A",{href:!0,"data-svelte-h":!0}),c(p)!=="svelte-ngisx1"&&(p.innerHTML=re),B=o(e),J(H.$$.fragment,e),G=o(e),b=l(e,"UL",{"data-svelte-h":!0}),c(b)!=="svelte-siv5yt"&&(b.innerHTML=ue),N=o(e),J(C.$$.fragment,e),R=o(e),L=l(e,"P",{}),ge(L).forEach(a),this.h()},h(){x(r,"name","hf:doc:metadata"),x(r,"content",$e),x(u,"href","https://huggingface.co/new-space?template=huggingchat/chat-ui-template"),x(g,"href","Parameters"),x(h,"href","Hugging Chat Landing UI"),x(p,"href","Hugging Chat")},m(e,t){_e(document.head,r),n(e,M,t),n(e,T,t),n(e,k,t),K(f,e,t),n(e,P,t),n(e,m,t),n(e,S,t),K(d,e,t),n(e,I,t),n(e,y,t),n(e,U,t),n(e,u,t),n(e,E,t),n(e,_,t),n(e,O,t),n(e,v,t),n(e,q,t),n(e,g,t),n(e,A,t),n(e,w,t),n(e,D,t),n(e,h,t),n(e,F,t),n(e,$,t),n(e,z,t),n(e,p,t),n(e,B,t),K(H,e,t),n(e,G,t),n(e,b,t),n(e,N,t),K(C,e,t),n(e,R,t),n(e,L,t),Y=!0},p:pe,i(e){Y||(Q(f.$$.fragment,e),Q(d.$$.fragment,e),Q(H.$$.fragment,e),Q(C.$$.fragment,e),Y=!0)},o(e){V(f.$$.fragment,e),V(d.$$.fragment,e),V(H.$$.fragment,e),V(C.$$.fragment,e),Y=!1},d(e){e&&(a(M),a(T),a(k),a(P),a(m),a(S),a(I),a(y),a(U),a(u),a(E),a(_),a(O),a(v),a(q),a(g),a(A),a(w),a(D),a(h),a(F),a($),a(z),a(p),a(B),a(G),a(b),a(N),a(R),a(L)),a(r),W(f,e),W(d,e),W(H,e),W(C,e)}}}const $e='{"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(Z){return fe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Te extends me{constructor(r){super(),de(this,r,He,we,he,{})}}export{Te as component};
