anzorq commited on
Commit
cebef55
1 Parent(s): 7bd0a5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ from diffusers import StableDiffusionPipeline
2
  import gradio as gr
3
  import torch
4
 
5
- device = "cuda:0" if torch.cuda.is_available() else "cpu"
6
 
7
  pipe = StableDiffusionPipeline.from_pretrained("nitrosocke/Arcane-Diffusion", torch_dtype=torch.float16)
8
  if torch.cuda.is_available():
@@ -45,7 +45,7 @@ with gr.Blocks() as demo:
45
  run = gr.Button(value="Run")
46
  gr.Markdown(f"Running on: {device}")
47
  with gr.Column():
48
- gallery = gr.Gallery()
49
 
50
  run.click(inference, inputs=[prompt, guidance, steps], outputs=gallery)
51
  gr.Examples([
 
2
  import gradio as gr
3
  import torch
4
 
5
+ device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
6
 
7
  pipe = StableDiffusionPipeline.from_pretrained("nitrosocke/Arcane-Diffusion", torch_dtype=torch.float16)
8
  if torch.cuda.is_available():
 
45
  run = gr.Button(value="Run")
46
  gr.Markdown(f"Running on: {device}")
47
  with gr.Column():
48
+ gallery = gr.Gallery(height=512)
49
 
50
  run.click(inference, inputs=[prompt, guidance, steps], outputs=gallery)
51
  gr.Examples([