Trim splash copy; single sign-in control
Browse filesFiles changed (2)
1684 unmodified lines168516861687168816891690169116921684 unmodified lines'<h1 class="c-splash__display">Small models,<br />''<span class="c-splash__display-2">measured energy.</span></h1>''<p class="c-splash__lede">Open-weight models run on machines people lend, '"with the energy read off a meter on the machine that ran them. When a worker ""has no meter the run says so, rather than reporting zero.</p>""</div>")1684 unmodified lines16851686168716881689169016911684 unmodified lines'<h1 class="c-splash__display">Small models,<br />''<span class="c-splash__display-2">measured energy.</span></h1>''<p class="c-splash__lede">Open-weight models run on machines people lend, '"with the energy read off a meter on the machine that ran them.</p>""</div>")
1761 unmodified lines17621763176417651766176717681229 unmodified lines29982999300030013002300330042 unmodified lines30073008300930103011301230133014301530163017301830191761 unmodified linesif messages:status = status_textexcept LoginRequired:identity = _identity_html("Sign in with Hugging Face")status = _status_html("Sign in with Hugging Face to use this server. Until then there ""is nothing here to see: workers are shown to the people who "1229 unmodified linesenter = gr.Button("Enter the network", variant="primary", scale=0)gr.HTML(render.splash_meta())with gr.Column(elem_classes="c-splash__plate"):gr.HTML(render.splash_figure(artwork))2 unmodified lines# Header, notice, sidebar chrome, worker cards, panels and the# footer are all server-rendered markup: see render.py. Gradio# components are used only where Python event wiring is needed.# Signed out until a handler says otherwise, and the header is# the control: it is a link while nobody is signed in and a# name afterwards, so there is never a sign-in control on# screen beside somebody's own name.identity = gr.HTML(_identity_html("Sign in with Hugging Face", sign_in=LOGIN_PATH))# THE SIGN-IN CONTROL, AND WHY IT IS CONDITIONAL.#1761 unmodified lines17621763176417651766176717681229 unmodified lines2998299930003001300230032 unmodified lines300630073008300930103011301230133014301530161761 unmodified linesif messages:status = status_textexcept LoginRequired:identity = _identity_html("")status = _status_html("Sign in with Hugging Face to use this server. Until then there ""is nothing here to see: workers are shown to the people who "1229 unmodified linesenter = gr.Button("Enter the network", variant="primary", scale=0)with gr.Column(elem_classes="c-splash__plate"):gr.HTML(render.splash_figure(artwork))2 unmodified lines# Header, notice, sidebar chrome, worker cards, panels and the# footer are all server-rendered markup: see render.py. Gradio# components are used only where Python event wiring is needed.# Signed out until a handler says otherwise. While nobody is# signed in the header stays empty: the Hugging Face login# button below is the one sign-in control, so a header link# would only duplicate it.identity = gr.HTML(_identity_html(""))# THE SIGN-IN CONTROL, AND WHY IT IS CONDITIONAL.#
distinct_server/render.py+1-2
distinct_server/ui.py+6-9