Spaces:
Running
on
Zero
Running
on
Zero
Update gradio_utils/utils.py
Browse files- gradio_utils/utils.py +3 -2
gradio_utils/utils.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import random
|
2 |
import collections
|
3 |
import gradio as gr
|
@@ -37,7 +38,7 @@ def adj_mx_from_edges(num_pts, skeleton, device='cuda', normalization_fix=True):
|
|
37 |
return adj
|
38 |
|
39 |
|
40 |
-
@spaces.GPU
|
41 |
def plot_results(support_img, query_img, support_kp, support_w, query_kp, query_w,
|
42 |
skeleton=None, prediction=None, radius=6, in_color=None,
|
43 |
original_skeleton=None, img_alpha=0.6, target_keypoints=None):
|
@@ -127,7 +128,7 @@ def plot_results(support_img, query_img, support_kp, support_w, query_kp, query_
|
|
127 |
plt.subplots_adjust(0, 0, 1, 1, 0, 0)
|
128 |
return plt
|
129 |
|
130 |
-
@spaces.GPU
|
131 |
def process(query_img, state,
|
132 |
cfg_path='configs/test/1shot_split1.py',
|
133 |
checkpoint_path='ckpt/1shot_split1.pth'):
|
|
|
1 |
+
import spaces
|
2 |
import random
|
3 |
import collections
|
4 |
import gradio as gr
|
|
|
38 |
return adj
|
39 |
|
40 |
|
41 |
+
@spaces.GPU(duration=30)
|
42 |
def plot_results(support_img, query_img, support_kp, support_w, query_kp, query_w,
|
43 |
skeleton=None, prediction=None, radius=6, in_color=None,
|
44 |
original_skeleton=None, img_alpha=0.6, target_keypoints=None):
|
|
|
128 |
plt.subplots_adjust(0, 0, 1, 1, 0, 0)
|
129 |
return plt
|
130 |
|
131 |
+
@spaces.GPU(duration=30)
|
132 |
def process(query_img, state,
|
133 |
cfg_path='configs/test/1shot_split1.py',
|
134 |
checkpoint_path='ckpt/1shot_split1.pth'):
|