Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
from PIL import Image
|
@@ -15,6 +16,7 @@ pipe = AutoPipelineForImage2Image.from_pretrained(
|
|
15 |
pipe.load_lora_weights("theoracle/sdxl-tok-lounge-lora")
|
16 |
|
17 |
# Inference function
|
|
|
18 |
def generate(image, prompt, negative_prompt, strength):
|
19 |
image = image.resize((1024, 1024))
|
20 |
result = pipe(
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
from PIL import Image
|
|
|
16 |
pipe.load_lora_weights("theoracle/sdxl-tok-lounge-lora")
|
17 |
|
18 |
# Inference function
|
19 |
+
@spaces.GPU(duration=60) # Adjust duration as needed
|
20 |
def generate(image, prompt, negative_prompt, strength):
|
21 |
image = image.resize((1024, 1024))
|
22 |
result = pipe(
|