Spaces:
Runtime error
Runtime error
Daryl Fung
commited on
Commit
•
c2a1867
1
Parent(s):
4ffbd67
fix separator
Browse files
app.py
CHANGED
@@ -15,8 +15,7 @@ except FileNotFoundError:
|
|
15 |
pass
|
16 |
|
17 |
|
18 |
-
def spleeter(aud, model_dropdown, model_file, index_file, pitch):
|
19 |
-
separator = Separator('spleeter:2stems')
|
20 |
filename = os.path.basename(aud).split('.')[0]
|
21 |
accompaniment_filename = f"./output/audio_example/{filename}_accompaniment.wav"
|
22 |
vocal_filename = f"./output/audio_example/{filename}_vocals.wav"
|
@@ -90,5 +89,7 @@ article = "<div style='text-align: center; max-width:800px; margin:10px auto;'><
|
|
90 |
|
91 |
|
92 |
if __name__ == '__main__':
|
93 |
-
|
|
|
|
|
94 |
|
|
|
15 |
pass
|
16 |
|
17 |
|
18 |
+
def spleeter(separator, aud, model_dropdown, model_file, index_file, pitch):
|
|
|
19 |
filename = os.path.basename(aud).split('.')[0]
|
20 |
accompaniment_filename = f"./output/audio_example/{filename}_accompaniment.wav"
|
21 |
vocal_filename = f"./output/audio_example/{filename}_vocals.wav"
|
|
|
89 |
|
90 |
|
91 |
if __name__ == '__main__':
|
92 |
+
separator = Separator('spleeter:2stems')
|
93 |
+
lambda_spleeter = lambda aud, model_dropdown, model_file, index_file, pitch: spleeter(separator, aud=aud, model_dropdown=model_dropdown, model_file=model_file, index_file=index_file, pitch=pitch)
|
94 |
+
gr.Interface(lambda_spleeter, inputs, outputs).launch()
|
95 |
|