hf spaces
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ import os
|
|
11 |
import numpy as np
|
12 |
from PIL import Image
|
13 |
|
|
|
14 |
|
15 |
path = os.getcwd()
|
16 |
output_dir = f"{path}/output"
|
@@ -24,6 +25,7 @@ class webui:
|
|
24 |
def __init__(self):
|
25 |
self.demo = gr.Blocks()
|
26 |
|
|
|
27 |
def undercoat(self, input_image, pos_prompt, neg_prompt, alpha_th):
|
28 |
org_line_image = input_image
|
29 |
image = pil2cv(input_image)
|
|
|
11 |
import numpy as np
|
12 |
from PIL import Image
|
13 |
|
14 |
+
import spaces
|
15 |
|
16 |
path = os.getcwd()
|
17 |
output_dir = f"{path}/output"
|
|
|
25 |
def __init__(self):
|
26 |
self.demo = gr.Blocks()
|
27 |
|
28 |
+
@spaces.GPU
|
29 |
def undercoat(self, input_image, pos_prompt, neg_prompt, alpha_th):
|
30 |
org_line_image = input_image
|
31 |
image = pil2cv(input_image)
|