sergon19 commited on
Commit
f8736c7
Β·
verified Β·
1 Parent(s): 5090790

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
 
3
  #gr.load("models/sergon19/green_bg_LoRa10").launch()
4
 
@@ -16,6 +17,7 @@ pipe = DiffusionPipeline.from_pretrained(
16
  pipe.load_lora_weights("sergon19/green_bg_LoRa10")
17
  _ = pipe.to("cuda")
18
 
 
19
  def generate_image(prompt):
20
  image = pipe(prompt=prompt, num_inference_steps=25).images[0]
21
  return image
 
1
  import gradio as gr
2
+ +import spaces
3
 
4
  #gr.load("models/sergon19/green_bg_LoRa10").launch()
5
 
 
17
  pipe.load_lora_weights("sergon19/green_bg_LoRa10")
18
  _ = pipe.to("cuda")
19
 
20
+ +@spaces.GPU
21
  def generate_image(prompt):
22
  image = pipe(prompt=prompt, num_inference_steps=25).images[0]
23
  return image