jbilcke-hf HF staff commited on
Commit
895e905
1 Parent(s): 7d263fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -8,10 +8,6 @@ import PIL.Image
8
  import torch
9
  from diffusers import DiffusionPipeline, UNet2DConditionModel, LCMScheduler
10
 
11
- DESCRIPTION = 'This space is an API service meant to be used by frontend applications.'
12
- if not torch.cuda.is_available():
13
- DESCRIPTION += '\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>'
14
-
15
  MAX_SEED = np.iinfo(np.int32).max
16
  MAX_IMAGE_SIZE = int(os.getenv('MAX_IMAGE_SIZE', '1024'))
17
  SECRET_TOKEN = os.getenv('SECRET_TOKEN', 'default_secret')
@@ -70,7 +66,13 @@ def generate(prompt: str,
70
  output_type='pil').images[0]
71
 
72
  with gr.Blocks() as demo:
73
- gr.Markdown(DESCRIPTION)
 
 
 
 
 
 
74
  secret_token = gr.Text(
75
  label='Secret Token',
76
  max_lines=1,
 
8
  import torch
9
  from diffusers import DiffusionPipeline, UNet2DConditionModel, LCMScheduler
10
 
 
 
 
 
11
  MAX_SEED = np.iinfo(np.int32).max
12
  MAX_IMAGE_SIZE = int(os.getenv('MAX_IMAGE_SIZE', '1024'))
13
  SECRET_TOKEN = os.getenv('SECRET_TOKEN', 'default_secret')
 
66
  output_type='pil').images[0]
67
 
68
  with gr.Blocks() as demo:
69
+ gr.HTML("""
70
+ <div style="z-index: 100; position: fixed; top: 0px; right: 0px; left: 0px; bottom: 0px; width: 100%; height: 100%; background: white; display: flex; align-items: center; justify-content: center; color: black;">
71
+ <div style="text-align: center; color: black;">
72
+ <p style="color: black;">This space is a REST API to programmatically generate MP4s using a LoRA.</p>
73
+ <p style="color: black;">Please see the <a href="https://hotshot.co" target="_blank">README.md</a> for more information.</p>
74
+ </div>
75
+ </div>""")
76
  secret_token = gr.Text(
77
  label='Secret Token',
78
  max_lines=1,