Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
|
4 |
#gr.load("models/sergon19/green_bg_LoRa10").launch()
|
5 |
|
@@ -17,7 +17,7 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
17 |
pipe.load_lora_weights("sergon19/green_bg_LoRa10")
|
18 |
_ = pipe.to("cuda")
|
19 |
|
20 |
-
|
21 |
def generate_image(prompt):
|
22 |
image = pipe(prompt=prompt, num_inference_steps=25).images[0]
|
23 |
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
|