carloscar commited on
Commit
5e6e450
β€’
1 Parent(s): c76e070

Styled header on space

Browse files
Files changed (1) hide show
  1. header_patch.py +12 -12
header_patch.py CHANGED
@@ -1,27 +1,27 @@
1
  with gr.Box(visible=os.environ.get("SPACE_ID")):
2
  if os.environ.get("SPACE_ID") and str(os.environ.get("IS_SHARED_UI", "") or "") not in ("", "0"):
3
  gr.HTML(f"""
4
- <div class="gr-prose" style="max-width: 80%">
5
- <p>Automatic1111 Stable Diffusion Web UI on πŸ€— Hugging Face | Checkpoint: <a href="https://civitai.com/models/10752/the-allys-mix-iii-revolutions" style="target=" _blank"="">theAllysMixIII_v10</a></p>
6
- <p>Docker setup: <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ€— Hugging Face βž” carloscar/stable-diffusion-webui-docker</a> | <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ™ GitHub βž” kalaspuff/stable-diffusion-webui-docker</a></p>
7
- <p>Duplicate this Space to run it privately without a queue + load additional checkpoints, VAE, LoRA models, etc.&nbsp;&nbsp;<a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}?duplicate=true"><img style="margin: 0" src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>
8
  </div>
9
  """)
10
  elif os.environ.get("SPACE_ID"):
11
  import torch
12
  if not torch.cuda.is_available():
13
  gr.HTML(f"""
14
- <div class="gr-prose" style="max-width: 80%">
15
- <p>Docker setup: <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ€— Hugging Face βž” carloscar/stable-diffusion-webui-docker</a> | <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ™ GitHub βž” kalaspuff/stable-diffusion-webui-docker</a></p>
16
- <p>Load additional checkpoints, VAE, LoRA models, etc. Read more on the README at the GitHub link above.</p>
17
- <p>This Space is currently running on CPU, which may yield very slow results - you can upgrade for a GPU <a href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}/settings" style="text-decoration: underline" target="_blank">in the Settings tab</a></p>
18
  </div>
19
  """)
20
  else:
21
  gr.HTML(f"""
22
- <div class="gr-prose" style="max-width: 80%">
23
- <p>Docker setup: <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ€— Hugging Face βž” carloscar/stable-diffusion-webui-docker</a> | <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ™ GitHub βž” kalaspuff/stable-diffusion-webui-docker</a></p>
24
- <p>Load additional checkpoints, VAE, LoRA models, etc. Read more on the README at the GitHub link above.</p>
25
- <p>This Space has GPU enabled - remember to remove the GPU from the space <a href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}/settings" style="text-decoration: underline" target="_blank">in the Settings tab</a> when you're done.</p>
26
  </div>
27
  """)
 
1
  with gr.Box(visible=os.environ.get("SPACE_ID")):
2
  if os.environ.get("SPACE_ID") and str(os.environ.get("IS_SHARED_UI", "") or "") not in ("", "0"):
3
  gr.HTML(f"""
4
+ <div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">
5
+ <p>β–² Automatic1111's Stable Diffusion WebUI + Mikubill's ControlNet WebUI extension | Running on Hugging Face | Loaded checkpoint: <a href="https://civitai.com/models/10752/the-allys-mix-iii-revolutions" style="target=" _blank"="">theAllysMixIII_v10</a></p>
6
+ <p>β–² Docker build from <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ™ GitHub βž” kalaspuff/stable-diffusion-webui-docker</a> / <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ€— Hugging Face βž” carloscar/stable-diffusion-webui-docker</a></p>
7
+ <p>β–² Duplicate this Space to run it privately without a queue + load additional checkpoints, VAE, LoRA models, etc.&nbsp;&nbsp;<a style="display:inline-block; position: absolute;" target="_blank" href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}?duplicate=true"><img style="margin: 0; height: 16px; position: relative; top: 2px;" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Duplicate%20Space-blue" alt="Duplicate Space"></a></p>
8
  </div>
9
  """)
10
  elif os.environ.get("SPACE_ID"):
11
  import torch
12
  if not torch.cuda.is_available():
13
  gr.HTML(f"""
14
+ <div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">
15
+ <p>β–² Docker setup: <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ€— Hugging Face βž” carloscar/stable-diffusion-webui-docker</a> | <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ™ GitHub βž” kalaspuff/stable-diffusion-webui-docker</a></p>
16
+ <p>β–² Load additional checkpoints, VAE, LoRA models, etc. Read more on the README at the GitHub link above.</p>
17
+ <p>β–² This Space is currently running on CPU, which may yield very slow results - you can upgrade for a GPU <a href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}/settings" style="text-decoration: underline" target="_blank">in the Settings tab</a></p>
18
  </div>
19
  """)
20
  else:
21
  gr.HTML(f"""
22
+ <div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">
23
+ <p>β–² Docker setup: <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ€— Hugging Face βž” carloscar/stable-diffusion-webui-docker</a> | <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">πŸ™ GitHub βž” kalaspuff/stable-diffusion-webui-docker</a></p>
24
+ <p>β–² Load additional checkpoints, VAE, LoRA models, etc. Read more on the README at the GitHub link above.</p>
25
+ <p>β–² This Space has GPU enabled - remember to remove the GPU from the space <a href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}/settings" style="text-decoration: underline" target="_blank">in the Settings tab</a> when you're done.</p>
26
  </div>
27
  """)