Spaces:
Runtime error
Runtime error
Updated asset path
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ class tester():
|
|
15 |
# Modeling
|
16 |
self.model = model
|
17 |
# Test Directory will also contain output after files
|
18 |
-
self.test_dir = '
|
19 |
def prepare_test(self):
|
20 |
# Removing older test and their results
|
21 |
if os.path.exists(self.test_dir):
|
@@ -32,7 +32,7 @@ class tester():
|
|
32 |
self.model.separate(test_subject,force_overwrite=True, resample=True)
|
33 |
|
34 |
def load_model():
|
35 |
-
model = torch.load('
|
36 |
return model
|
37 |
|
38 |
def separator(original_audio, path):
|
@@ -41,9 +41,9 @@ def separator(original_audio, path):
|
|
41 |
Test.test(path)
|
42 |
|
43 |
separated_audios = list()
|
44 |
-
separated_audios.append('
|
45 |
-
separated_audios.append('
|
46 |
-
separated_audios.append('
|
47 |
|
48 |
return separated_audios
|
49 |
|
@@ -97,10 +97,10 @@ with demo:
|
|
97 |
outputs_audio = [original_audio, output_audio1, output_audio2]
|
98 |
button = gr.Button("Separate")
|
99 |
examples = [
|
100 |
-
"
|
101 |
-
"
|
102 |
-
"
|
103 |
-
"
|
104 |
]
|
105 |
|
106 |
example_selector = gr.inputs.Radio(examples, label="Example Audio")
|
|
|
15 |
# Modeling
|
16 |
self.model = model
|
17 |
# Test Directory will also contain output after files
|
18 |
+
self.test_dir = 'asset/test_subject/'
|
19 |
def prepare_test(self):
|
20 |
# Removing older test and their results
|
21 |
if os.path.exists(self.test_dir):
|
|
|
32 |
self.model.separate(test_subject,force_overwrite=True, resample=True)
|
33 |
|
34 |
def load_model():
|
35 |
+
model = torch.load('asset/model/model_two.bin')
|
36 |
return model
|
37 |
|
38 |
def separator(original_audio, path):
|
|
|
41 |
Test.test(path)
|
42 |
|
43 |
separated_audios = list()
|
44 |
+
separated_audios.append('asset/test_subject/test.wav')
|
45 |
+
separated_audios.append('asset/test_subject/test_est1.wav')
|
46 |
+
separated_audios.append('asset/test_subject/test_est2.wav')
|
47 |
|
48 |
return separated_audios
|
49 |
|
|
|
97 |
outputs_audio = [original_audio, output_audio1, output_audio2]
|
98 |
button = gr.Button("Separate")
|
99 |
examples = [
|
100 |
+
"asset/test/mix_clean/Audio0.wav",
|
101 |
+
"asset/test/mix_clean/Audio1.wav",
|
102 |
+
"asset/test/mix_clean/Audio2.wav",
|
103 |
+
"asset/test/mix_clean/Audio3.wav"
|
104 |
]
|
105 |
|
106 |
example_selector = gr.inputs.Radio(examples, label="Example Audio")
|