niggathug commited on
Commit
c3c0c41
1 Parent(s): ca31c6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -13,6 +13,12 @@ from diffusers import (
13
  T2IAdapter,
14
  )
15
 
 
 
 
 
 
 
16
 
17
  style_list = [
18
  {
@@ -137,7 +143,14 @@ def run(
137
  return out
138
 
139
 
140
- with gr.Blocks() as demo:
 
 
 
 
 
 
 
141
  with gr.Row():
142
  with gr.Column():
143
  with gr.Group():
@@ -247,5 +260,5 @@ with gr.Blocks() as demo:
247
  api_name=False,
248
  )
249
 
250
-
251
- demo.queue(max_size=20).launch()
 
13
  T2IAdapter,
14
  )
15
 
16
+ DESCRIPTION = '''# Doodly - T2I-Adapter-SDXL **Sketch**
17
+ To try out all the [6 T2I-Adapter](https://huggingface.co/collections/TencentARC/t2i-adapter-sdxl-64fac9cbf393f30370eeb02f) released for SDXL, [click here](https://huggingface.co/spaces/TencentARC/T2I-Adapter-SDXL)
18
+ '''
19
+
20
+ if not torch.cuda.is_available():
21
+ DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
22
 
23
  style_list = [
24
  {
 
143
  return out
144
 
145
 
146
+ with gr.Blocks(css="style.css") as demo:
147
+ gr.Markdown(DESCRIPTION, elem_id="description")
148
+ gr.DuplicateButton(
149
+ value="Duplicate Space for private use",
150
+ elem_id="duplicate-button",
151
+ visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
152
+ )
153
+
154
  with gr.Row():
155
  with gr.Column():
156
  with gr.Group():
 
260
  api_name=False,
261
  )
262
 
263
+ if __name__ == "__main__":
264
+ demo.queue(max_size=20).launch()