Spaces:
Starting
on
A10G
Starting
on
A10G
ljzycmd
commited on
Commit
β’
18438f3
1
Parent(s):
b7d4a35
Update README.md
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import torch
|
@@ -16,18 +17,16 @@ from gradio_app.real_image_editing_app import create_demo_editing
|
|
16 |
from gradio_app.app_utils import global_context
|
17 |
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
DESCRIPTION += '
|
25 |
-
you may duplicate the space and upgrade to GPU in settings. </p>'
|
26 |
-
|
27 |
|
28 |
with gr.Blocks(css="style.css") as demo:
|
29 |
gr.Markdown(TITLE)
|
30 |
-
gr.
|
31 |
model_path_gr = gr.Dropdown(
|
32 |
["andite/anything-v4.0",
|
33 |
"CompVis/stable-diffusion-v1-4",
|
|
|
1 |
+
import os
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
import torch
|
|
|
17 |
from gradio_app.app_utils import global_context
|
18 |
|
19 |
|
20 |
+
SPACE_ID = os.getenv('SPACE_ID')
|
21 |
+
TITLE = '# [MasaCtrl](https://ljzycmd.github.io/projects/MasaCtrl/)</h1>'
|
22 |
+
DESCRIPTION = '<div align="center">'
|
23 |
+
DESCRIPTION += f'<p>Gradio demo for MasaCtrl: <a href="https://github.com/TencentARC/MasaCtrl">[Github]</a>, <a href="https://arxiv.org/abs/2304.08465">[Paper]</a>. If MasaCtrl is helpful, please help to β the <a href="https://github.com/TencentARC/MasaCtrl">Github Repo</a> π</p>'
|
24 |
+
DESCRIPTION += f'<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
|
25 |
+
DESCRIPTION += '</div>'
|
|
|
|
|
26 |
|
27 |
with gr.Blocks(css="style.css") as demo:
|
28 |
gr.Markdown(TITLE)
|
29 |
+
gr.HTML(DESCRIPTION)
|
30 |
model_path_gr = gr.Dropdown(
|
31 |
["andite/anything-v4.0",
|
32 |
"CompVis/stable-diffusion-v1-4",
|