Spaces:
Running
on
Zero
Running
on
Zero
wzhouxiff
commited on
Commit
·
4b34a73
1
Parent(s):
1cc2bd8
mute get Mid Params button
Browse files
app.py
CHANGED
@@ -159,7 +159,7 @@ pipeline = get_pipeline(model_id, "unet", model_config['down_block_types'], mode
|
|
159 |
# pipeline = None
|
160 |
|
161 |
### run the demo ##
|
162 |
-
@spaces.GPU(duration=
|
163 |
def segment(canvas, image, logits):
|
164 |
if logits is not None:
|
165 |
logits *= 32.0
|
@@ -487,7 +487,7 @@ def run_objctrl_2_5d(condition_image,
|
|
487 |
|
488 |
|
489 |
# UI function
|
490 |
-
@spaces.GPU(duration=
|
491 |
def process_image(raw_image, trajectory_points):
|
492 |
|
493 |
image, points = raw_image['image'], raw_image['points']
|
@@ -543,7 +543,7 @@ def draw_points_on_image(img, points):
|
|
543 |
|
544 |
return img
|
545 |
|
546 |
-
@spaces.GPU(duration=
|
547 |
def from_examples(raw_input, raw_image_points, canvas, seg_image_points, selected_points_text, camera_option, mask_bk):
|
548 |
|
549 |
selected_points = ast.literal_eval(selected_points_text)
|
@@ -705,7 +705,7 @@ with gr.Blocks() as demo:
|
|
705 |
|
706 |
generated_button = gr.Button("Generate")
|
707 |
|
708 |
-
get_mid_params_button = gr.Button("Get Mid Params")
|
709 |
|
710 |
|
711 |
# # event definition
|
|
|
159 |
# pipeline = None
|
160 |
|
161 |
### run the demo ##
|
162 |
+
@spaces.GPU(duration=7)
|
163 |
def segment(canvas, image, logits):
|
164 |
if logits is not None:
|
165 |
logits *= 32.0
|
|
|
487 |
|
488 |
|
489 |
# UI function
|
490 |
+
@spaces.GPU(duration=7)
|
491 |
def process_image(raw_image, trajectory_points):
|
492 |
|
493 |
image, points = raw_image['image'], raw_image['points']
|
|
|
543 |
|
544 |
return img
|
545 |
|
546 |
+
@spaces.GPU(duration=15)
|
547 |
def from_examples(raw_input, raw_image_points, canvas, seg_image_points, selected_points_text, camera_option, mask_bk):
|
548 |
|
549 |
selected_points = ast.literal_eval(selected_points_text)
|
|
|
705 |
|
706 |
generated_button = gr.Button("Generate")
|
707 |
|
708 |
+
get_mid_params_button = gr.Button("Get Mid Params", visible=False)
|
709 |
|
710 |
|
711 |
# # event definition
|