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