Spaces:
Runtime error
Runtime error
jhj0517
commited on
Commit
·
cf94415
1
Parent(s):
5929ef8
Chore : rename variable
Browse files
app.py
CHANGED
|
@@ -26,8 +26,8 @@ class App:
|
|
| 26 |
self.default_filter = PIXELIZE_FILTER
|
| 27 |
self.default_color = DEFAULT_COLOR
|
| 28 |
self.default_pixel_size = DEFAULT_PIXEL_SIZE
|
| 29 |
-
|
| 30 |
-
with open(
|
| 31 |
self.default_hparams = yaml.safe_load(file)
|
| 32 |
|
| 33 |
def mask_parameters(self,
|
|
@@ -90,7 +90,7 @@ class App:
|
|
| 90 |
return gr.Image(label="Preview", value=image)
|
| 91 |
|
| 92 |
def launch(self):
|
| 93 |
-
_mask_hparams = self.
|
| 94 |
|
| 95 |
with self.demo:
|
| 96 |
with gr.Tabs():
|
|
|
|
| 26 |
self.default_filter = PIXELIZE_FILTER
|
| 27 |
self.default_color = DEFAULT_COLOR
|
| 28 |
self.default_pixel_size = DEFAULT_PIXEL_SIZE
|
| 29 |
+
default_hparam_config_path = os.path.join(SAM2_CONFIGS_DIR, "default_hparams.yaml")
|
| 30 |
+
with open(default_hparam_config_path, 'r') as file:
|
| 31 |
self.default_hparams = yaml.safe_load(file)
|
| 32 |
|
| 33 |
def mask_parameters(self,
|
|
|
|
| 90 |
return gr.Image(label="Preview", value=image)
|
| 91 |
|
| 92 |
def launch(self):
|
| 93 |
+
_mask_hparams = self.default_hparams["mask_hparams"]
|
| 94 |
|
| 95 |
with self.demo:
|
| 96 |
with gr.Tabs():
|