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