User1342 commited on
Commit
9eba326
·
1 Parent(s): 3d4d5f0

Trim splash copy; single sign-in control

Browse files
distinct_server/render.py CHANGED
@@ -1685,8 +1685,7 @@ def splash_copy() -> str:
1685
  '<h1 class="c-splash__display">Small models,<br />'
1686
  '<span class="c-splash__display-2">measured energy.</span></h1>'
1687
  '<p class="c-splash__lede">Open-weight models run on machines people lend, '
1688
- "with the energy read off a meter on the machine that ran them. When a worker "
1689
- "has no meter the run says so, rather than reporting zero.</p>"
1690
  "</div>"
1691
  )
1692
 
 
1685
  '<h1 class="c-splash__display">Small models,<br />'
1686
  '<span class="c-splash__display-2">measured energy.</span></h1>'
1687
  '<p class="c-splash__lede">Open-weight models run on machines people lend, '
1688
+ "with the energy read off a meter on the machine that ran them.</p>"
 
1689
  "</div>"
1690
  )
1691
 
distinct_server/ui.py CHANGED
@@ -1762,7 +1762,7 @@ class DistinctUI:
1762
  if messages:
1763
  status = status_text
1764
  except LoginRequired:
1765
- identity = _identity_html("Sign in with Hugging Face")
1766
  status = _status_html(
1767
  "Sign in with Hugging Face to use this server. Until then there "
1768
  "is nothing here to see: workers are shown to the people who "
@@ -2998,7 +2998,6 @@ class DistinctUI:
2998
  enter = gr.Button(
2999
  "Enter the network", variant="primary", scale=0
3000
  )
3001
- gr.HTML(render.splash_meta())
3002
  with gr.Column(elem_classes="c-splash__plate"):
3003
  gr.HTML(render.splash_figure(artwork))
3004
 
@@ -3007,13 +3006,11 @@ class DistinctUI:
3007
  # Header, notice, sidebar chrome, worker cards, panels and the
3008
  # footer are all server-rendered markup: see render.py. Gradio
3009
  # components are used only where Python event wiring is needed.
3010
- # Signed out until a handler says otherwise, and the header is
3011
- # the control: it is a link while nobody is signed in and a
3012
- # name afterwards, so there is never a sign-in control on
3013
- # screen beside somebody's own name.
3014
- identity = gr.HTML(
3015
- _identity_html("Sign in with Hugging Face", sign_in=LOGIN_PATH)
3016
- )
3017
 
3018
  # THE SIGN-IN CONTROL, AND WHY IT IS CONDITIONAL.
3019
  #
 
1762
  if messages:
1763
  status = status_text
1764
  except LoginRequired:
1765
+ identity = _identity_html("")
1766
  status = _status_html(
1767
  "Sign in with Hugging Face to use this server. Until then there "
1768
  "is nothing here to see: workers are shown to the people who "
 
2998
  enter = gr.Button(
2999
  "Enter the network", variant="primary", scale=0
3000
  )
 
3001
  with gr.Column(elem_classes="c-splash__plate"):
3002
  gr.HTML(render.splash_figure(artwork))
3003
 
 
3006
  # Header, notice, sidebar chrome, worker cards, panels and the
3007
  # footer are all server-rendered markup: see render.py. Gradio
3008
  # components are used only where Python event wiring is needed.
3009
+ # Signed out until a handler says otherwise. While nobody is
3010
+ # signed in the header stays empty: the Hugging Face login
3011
+ # button below is the one sign-in control, so a header link
3012
+ # would only duplicate it.
3013
+ identity = gr.HTML(_identity_html(""))
 
 
3014
 
3015
  # THE SIGN-IN CONTROL, AND WHY IT IS CONDITIONAL.
3016
  #