Spaces:
Sleeping
Sleeping
jhj0517
commited on
Commit
•
de5173c
1
Parent(s):
869e94e
Rename function
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ class App:
|
|
42 |
with open(default_hparam_config_path, 'r') as file:
|
43 |
self.default_hparams = yaml.safe_load(file)
|
44 |
|
45 |
-
def
|
46 |
-
|
47 |
if hparams is None:
|
48 |
hparams = self.default_hparams["mask_hparams"]
|
49 |
mask_components = [
|
@@ -122,7 +122,7 @@ class App:
|
|
122 |
choices=self.sam_inf.available_models)
|
123 |
|
124 |
with gr.Accordion("Mask Parameters", open=False, visible=self.default_mode == AUTOMATIC_MODE) as acc_mask_hparams:
|
125 |
-
mask_hparams_component = self.
|
126 |
|
127 |
cb_multimask_output = gr.Checkbox(label="multimask_output", value=_mask_hparams["multimask_output"])
|
128 |
|
|
|
42 |
with open(default_hparam_config_path, 'r') as file:
|
43 |
self.default_hparams = yaml.safe_load(file)
|
44 |
|
45 |
+
def mask_generation_parameters(self,
|
46 |
+
hparams: Optional[Dict] = None):
|
47 |
if hparams is None:
|
48 |
hparams = self.default_hparams["mask_hparams"]
|
49 |
mask_components = [
|
|
|
122 |
choices=self.sam_inf.available_models)
|
123 |
|
124 |
with gr.Accordion("Mask Parameters", open=False, visible=self.default_mode == AUTOMATIC_MODE) as acc_mask_hparams:
|
125 |
+
mask_hparams_component = self.mask_generation_parameters(_mask_hparams)
|
126 |
|
127 |
cb_multimask_output = gr.Checkbox(label="multimask_output", value=_mask_hparams["multimask_output"])
|
128 |
|