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 _e,h as l,f as a,c as o,j as ge,u as J,x as c,k as x,y as ye,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,U,_,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.',I,u,ae='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_landing.png"/>',E,y,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.`,A,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>HUGGING_FACE_HUB_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,g,oe='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_params.png"/>',O,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,H,ce="Start chatting!",q,p,re='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/huggingface.co_spaces_docker_chatui_chat.png"/>',B,$,N,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>',R,C,Y,L,z;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"}}),$=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),U=i(),_=s("p"),_.innerHTML=te,I=i(),u=s("a"),u.innerHTML=ae,E=i(),y=s("p"),y.textContent=ne,A=i(),v=s("p"),v.innerHTML=ie,G=i(),g=s("a"),g.innerHTML=oe,O=i(),w=s("p"),w.innerHTML=se,D=i(),h=s("a"),h.innerHTML=le,F=i(),H=s("p"),H.textContent=ce,q=i(),p=s("a"),p.innerHTML=re,B=i(),j($.$$.fragment),N=i(),b=s("ul"),b.innerHTML=ue,R=i(),j(C.$$.fragment),Y=i(),L=s("p"),this.h()},l(e){const t=_e("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),U=o(e),_=l(e,"P",{"data-svelte-h":!0}),c(_)!=="svelte-6en2ro"&&(_.innerHTML=te),I=o(e),u=l(e,"A",{href:!0,"data-svelte-h":!0}),c(u)!=="svelte-1u1qq9q"&&(u.innerHTML=ae),E=o(e),y=l(e,"P",{"data-svelte-h":!0}),c(y)!=="svelte-s974lz"&&(y.textContent=ne),A=o(e),v=l(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-1caj1nm"&&(v.innerHTML=ie),G=o(e),g=l(e,"A",{href:!0,"data-svelte-h":!0}),c(g)!=="svelte-l6ewtc"&&(g.innerHTML=oe),O=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),H=l(e,"P",{"data-svelte-h":!0}),c(H)!=="svelte-1xle12d"&&(H.textContent=ce),q=o(e),p=l(e,"A",{href:!0,"data-svelte-h":!0}),c(p)!=="svelte-ngisx1"&&(p.innerHTML=re),B=o(e),J($.$$.fragment,e),N=o(e),b=l(e,"UL",{"data-svelte-h":!0}),c(b)!=="svelte-siv5yt"&&(b.innerHTML=ue),R=o(e),J(C.$$.fragment,e),Y=o(e),L=l(e,"P",{}),ge(L).forEach(a),this.h()},h(){x(r,"name","hf:doc:metadata"),x(r,"content",He),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){ye(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,U,t),n(e,_,t),n(e,I,t),n(e,u,t),n(e,E,t),n(e,y,t),n(e,A,t),n(e,v,t),n(e,G,t),n(e,g,t),n(e,O,t),n(e,w,t),n(e,D,t),n(e,h,t),n(e,F,t),n(e,H,t),n(e,q,t),n(e,p,t),n(e,B,t),K($,e,t),n(e,N,t),n(e,b,t),n(e,R,t),K(C,e,t),n(e,Y,t),n(e,L,t),z=!0},p:pe,i(e){z||(Q(f.$$.fragment,e),Q(d.$$.fragment,e),Q($.$$.fragment,e),Q(C.$$.fragment,e),z=!0)},o(e){V(f.$$.fragment,e),V(d.$$.fragment,e),V($.$$.fragment,e),V(C.$$.fragment,e),z=!1},d(e){e&&(a(M),a(T),a(k),a(P),a(m),a(S),a(U),a(_),a(I),a(u),a(E),a(y),a(A),a(v),a(G),a(g),a(O),a(w),a(D),a(h),a(F),a(H),a(q),a(p),a(B),a(N),a(b),a(R),a(Y),a(L)),a(r),W(f,e),W(d,e),W($,e),W(C,e)}}}const He='{"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 $e(Z){return fe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Te extends me{constructor(r){super(),de(this,r,$e,we,he,{})}}export{Te as component};
