asahi417 commited on
Commit
0ee280c
·
verified ·
1 Parent(s): a21775a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -18,6 +18,12 @@ examples = [
18
  "An astronaut riding a green horse",
19
  "A delicious ceviche cheesecake slice",
20
  ]
 
 
 
 
 
 
21
 
22
 
23
  @spaces.GPU
@@ -36,8 +42,8 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
36
  return image, seed
37
 
38
 
39
- with gr.Blocks() as demo:
40
- with gr.Column():
41
  gr.Markdown("# Demo [Stable Diffusion 3 Medium](https://huggingface.co/stabilityai/stable-diffusion-3-medium)")
42
  with gr.Row():
43
  prompt = gr.Text(
@@ -103,5 +109,4 @@ with gr.Blocks() as demo:
103
  inputs=[prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
104
  outputs=[result, seed]
105
  )
106
-
107
  demo.launch()
 
18
  "An astronaut riding a green horse",
19
  "A delicious ceviche cheesecake slice",
20
  ]
21
+ css = """
22
+ #col-container {
23
+ margin: 0 auto;
24
+ max-width: 580px;
25
+ }
26
+ """
27
 
28
 
29
  @spaces.GPU
 
42
  return image, seed
43
 
44
 
45
+ with gr.Blocks(css=css) as demo:
46
+ with gr.Column(elem_id="col-container"):
47
  gr.Markdown("# Demo [Stable Diffusion 3 Medium](https://huggingface.co/stabilityai/stable-diffusion-3-medium)")
48
  with gr.Row():
49
  prompt = gr.Text(
 
109
  inputs=[prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
110
  outputs=[result, seed]
111
  )
 
112
  demo.launch()