Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files+ space for zeroGPU
app.py
CHANGED
@@ -15,9 +15,13 @@ from PIL import Image
|
|
15 |
from functools import partial
|
16 |
from main import run_main
|
17 |
import time
|
|
|
|
|
18 |
LENGTH=512 #length of the square area displaying/editing images
|
19 |
TRANSPARENCY = 150 # transparency of the mask in display
|
20 |
|
|
|
|
|
21 |
def add_mask(mask_np_list_updated, mask_label_list):
|
22 |
mask_new = np.zeros_like(mask_np_list_updated[0])
|
23 |
mask_np_list_updated.append(mask_new)
|
|
|
15 |
from functools import partial
|
16 |
from main import run_main
|
17 |
import time
|
18 |
+
import spaces
|
19 |
+
|
20 |
LENGTH=512 #length of the square area displaying/editing images
|
21 |
TRANSPARENCY = 150 # transparency of the mask in display
|
22 |
|
23 |
+
|
24 |
+
@spaces.GPU
|
25 |
def add_mask(mask_np_list_updated, mask_label_list):
|
26 |
mask_new = np.zeros_like(mask_np_list_updated[0])
|
27 |
mask_np_list_updated.append(mask_new)
|