Add application file
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ os.system("midi_ddsp_download_model_weights")
|
|
6 |
|
7 |
def inference(audio):
|
8 |
print(Path(audio.name))
|
|
|
9 |
os.system("midi_ddsp_synthesize --midi_path "+audio.name)
|
10 |
return Path(audio.name).stem+"/0_mix.wav"
|
11 |
|
@@ -14,7 +15,7 @@ description = "Gradio demo for MIDI-DDSP: Detailed Control of Musical Performanc
|
|
14 |
|
15 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.09312' target='_blank'>MIDI-DDSP: Detailed Control of Musical Performance via Hierarchical Modeling</a> | <a href='https://github.com/magenta/midi-ddsp' target='_blank'>Github Repo</a></p>"
|
16 |
|
17 |
-
examples=[['
|
18 |
|
19 |
gr.Interface(
|
20 |
inference,
|
|
|
6 |
|
7 |
def inference(audio):
|
8 |
print(Path(audio.name))
|
9 |
+
print(Path(audio.name).stem)
|
10 |
os.system("midi_ddsp_synthesize --midi_path "+audio.name)
|
11 |
return Path(audio.name).stem+"/0_mix.wav"
|
12 |
|
|
|
15 |
|
16 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.09312' target='_blank'>MIDI-DDSP: Detailed Control of Musical Performance via Hierarchical Modeling</a> | <a href='https://github.com/magenta/midi-ddsp' target='_blank'>Github Repo</a></p>"
|
17 |
|
18 |
+
examples=[[f'os.path.dirname(os.path.abspath(__file__))/input.mid']]
|
19 |
|
20 |
gr.Interface(
|
21 |
inference,
|