Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -62,10 +62,13 @@ def inference_automatic(input_img, class_names):
|
|
| 62 |
@torch.autocast(device_type="cuda", dtype=torch.float32)
|
| 63 |
def inference_point(input_img, evt: gr.SelectData,):
|
| 64 |
|
|
|
|
|
|
|
|
|
|
| 65 |
x, y = evt.index[0], evt.index[1]
|
| 66 |
points = [[x, y]]
|
| 67 |
print(f"Selected point: {points}")
|
| 68 |
-
|
| 69 |
config_file = './configs/ground-truth-warmup/mask-adapter/mask_adapter_convnext_large_cocopan_eval_ade20k.yaml'
|
| 70 |
cfg = setup_cfg(config_file)
|
| 71 |
|
|
|
|
| 62 |
@torch.autocast(device_type="cuda", dtype=torch.float32)
|
| 63 |
def inference_point(input_img, evt: gr.SelectData,):
|
| 64 |
|
| 65 |
+
|
| 66 |
+
mp.set_start_method("spawn", force=True)
|
| 67 |
+
|
| 68 |
x, y = evt.index[0], evt.index[1]
|
| 69 |
points = [[x, y]]
|
| 70 |
print(f"Selected point: {points}")
|
| 71 |
+
|
| 72 |
config_file = './configs/ground-truth-warmup/mask-adapter/mask_adapter_convnext_large_cocopan_eval_ade20k.yaml'
|
| 73 |
cfg = setup_cfg(config_file)
|
| 74 |
|