Spaces:
Running
Running
joselobenitezg
commited on
add zero gpu
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def update_model_choices(task):
|
|
15 |
model_choices = list(SAPIENS_LITE_MODELS_PATH[task.lower()].keys())
|
16 |
return gr.Dropdown(choices=model_choices, value=model_choices[0] if model_choices else None)
|
17 |
|
18 |
-
@spaces.
|
19 |
def process_image(input_image, task, version):
|
20 |
if isinstance(input_image, np.ndarray):
|
21 |
input_image = Image.fromarray(input_image)
|
@@ -34,7 +34,7 @@ def process_image(input_image, task, version):
|
|
34 |
|
35 |
return result
|
36 |
|
37 |
-
@spaces.
|
38 |
def process_video(input_video, task, version):
|
39 |
cap = cv2.VideoCapture(input_video)
|
40 |
fps = cap.get(cv2.CAP_PROP_FPS)
|
|
|
15 |
model_choices = list(SAPIENS_LITE_MODELS_PATH[task.lower()].keys())
|
16 |
return gr.Dropdown(choices=model_choices, value=model_choices[0] if model_choices else None)
|
17 |
|
18 |
+
@spaces.GPU(duration=75)
|
19 |
def process_image(input_image, task, version):
|
20 |
if isinstance(input_image, np.ndarray):
|
21 |
input_image = Image.fromarray(input_image)
|
|
|
34 |
|
35 |
return result
|
36 |
|
37 |
+
@spaces.GPU(duration=75)
|
38 |
def process_video(input_video, task, version):
|
39 |
cap = cv2.VideoCapture(input_video)
|
40 |
fps = cap.get(cv2.CAP_PROP_FPS)
|