Spaces:
Running
Running
jhj0517
commited on
Commit
·
598f1d1
1
Parent(s):
5306f0a
Embed bgm seperator inside whisper base
Browse files
app.py
CHANGED
@@ -36,10 +36,6 @@ class App:
|
|
36 |
self.deepl_api = DeepLAPI(
|
37 |
output_dir=os.path.join(self.args.output_dir, "translations")
|
38 |
)
|
39 |
-
self.music_separator = MusicSeparator(
|
40 |
-
model_dir=self.args.uvr_model_dir,
|
41 |
-
output_dir=os.path.join(self.args.output_dir, "UVR")
|
42 |
-
)
|
43 |
self.default_params = load_yaml(DEFAULT_PARAMETERS_CONFIG_PATH)
|
44 |
print(f"Use \"{self.args.whisper_type}\" implementation")
|
45 |
print(f"Device \"{self.whisper_inf.device}\" is detected")
|
@@ -154,10 +150,10 @@ class App:
|
|
154 |
with gr.Accordion("BGM Separation", open=False):
|
155 |
cb_bgm_separation = gr.Checkbox(label="Enable BGM separation", value=uvr_params["is_separate_bgm"],
|
156 |
interactive=True)
|
157 |
-
dd_uvr_device = gr.Dropdown(label="Device", value=self.music_separator.device,
|
158 |
-
choices=self.music_separator.available_devices)
|
159 |
dd_uvr_model_size = gr.Dropdown(label="Model", value=uvr_params["model_size"],
|
160 |
-
choices=self.music_separator.available_models)
|
161 |
nb_uvr_segment_size = gr.Number(label="Segment Size", value=uvr_params["segment_size"], precision=0)
|
162 |
cb_uvr_save_file = gr.Checkbox(label="Save Separated Files to Output Directory",
|
163 |
value=uvr_params["save_file"], interactive=True)
|
|
|
36 |
self.deepl_api = DeepLAPI(
|
37 |
output_dir=os.path.join(self.args.output_dir, "translations")
|
38 |
)
|
|
|
|
|
|
|
|
|
39 |
self.default_params = load_yaml(DEFAULT_PARAMETERS_CONFIG_PATH)
|
40 |
print(f"Use \"{self.args.whisper_type}\" implementation")
|
41 |
print(f"Device \"{self.whisper_inf.device}\" is detected")
|
|
|
150 |
with gr.Accordion("BGM Separation", open=False):
|
151 |
cb_bgm_separation = gr.Checkbox(label="Enable BGM separation", value=uvr_params["is_separate_bgm"],
|
152 |
interactive=True)
|
153 |
+
dd_uvr_device = gr.Dropdown(label="Device", value=self.whisper_inf.music_separator.device,
|
154 |
+
choices=self.whisper_inf.music_separator.available_devices)
|
155 |
dd_uvr_model_size = gr.Dropdown(label="Model", value=uvr_params["model_size"],
|
156 |
+
choices=self.whisper_inf.music_separator.available_models)
|
157 |
nb_uvr_segment_size = gr.Number(label="Segment Size", value=uvr_params["segment_size"], precision=0)
|
158 |
cb_uvr_save_file = gr.Checkbox(label="Save Separated Files to Output Directory",
|
159 |
value=uvr_params["save_file"], interactive=True)
|