vilarin commited on
Commit
4efab5c
1 Parent(s): 3a2b9b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -22,8 +22,20 @@ CSS = """
22
  .gradio-container {
23
  max-width: 690px !important;
24
  }
 
 
 
25
  """
26
 
 
 
 
 
 
 
 
 
 
27
  # Ensure model and scheduler are initialized in GPU-enabled function
28
  if torch.cuda.is_available():
29
  unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
@@ -69,7 +81,7 @@ examples = [
69
 
70
  # Gradio Interface
71
 
72
- with gr.Blocks(css=CSS, theme="soft") as demo:
73
  gr.HTML("<h1><center>Adobe DMD2🦖</center></h1>")
74
  gr.HTML("<p><center><a href='https://huggingface.co/tianweiy/DMD2'>DMD2</a> text-to-image generation</center><br><center>Multi-Languages, 4-step is higher quality & 2X slower</center></p>")
75
  with gr.Group():
 
22
  .gradio-container {
23
  max-width: 690px !important;
24
  }
25
+ footer {
26
+ visibility: hidden;
27
+ }
28
  """
29
 
30
+ JS = """function () {
31
+ gradioURL = window.location.href
32
+ if (!gradioURL.endsWith('?__theme=dark')) {
33
+ window.location.replace(gradioURL + '?__theme=dark');
34
+ }
35
+ }"""
36
+
37
+
38
+
39
  # Ensure model and scheduler are initialized in GPU-enabled function
40
  if torch.cuda.is_available():
41
  unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
 
81
 
82
  # Gradio Interface
83
 
84
+ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
85
  gr.HTML("<h1><center>Adobe DMD2🦖</center></h1>")
86
  gr.HTML("<p><center><a href='https://huggingface.co/tianweiy/DMD2'>DMD2</a> text-to-image generation</center><br><center>Multi-Languages, 4-step is higher quality & 2X slower</center></p>")
87
  with gr.Group():