Update app.py
Browse files
app.py
CHANGED
@@ -313,7 +313,7 @@ def inference(audio):
|
|
313 |
audio = upload_audio(contents,sample_rate=16000)
|
314 |
est_ns = inference_model(audio)
|
315 |
note_seq.sequence_proto_to_midi_file(est_ns, './transcribed.mid')
|
316 |
-
|
317 |
|
318 |
title = "MT3"
|
319 |
description = "MT3:多任务多音轨音乐转录的 Gradio 演示。要使用它,只需上传音频文件,或点击示例以查看效果。更多信息请参阅下面的链接。"
|
@@ -325,5 +325,5 @@ examples=[['canon.flac'], ['download.wav']]
|
|
325 |
gr.Interface(
|
326 |
inference,
|
327 |
gr.Audio(type="filepath",label="输入"),
|
328 |
-
outputs=
|
329 |
).launch()
|
|
|
313 |
audio = upload_audio(contents,sample_rate=16000)
|
314 |
est_ns = inference_model(audio)
|
315 |
note_seq.sequence_proto_to_midi_file(est_ns, './transcribed.mid')
|
316 |
+
return "./transcribed.mid"
|
317 |
|
318 |
title = "MT3"
|
319 |
description = "MT3:多任务多音轨音乐转录的 Gradio 演示。要使用它,只需上传音频文件,或点击示例以查看效果。更多信息请参阅下面的链接。"
|
|
|
325 |
gr.Interface(
|
326 |
inference,
|
327 |
gr.Audio(type="filepath",label="输入"),
|
328 |
+
outputs="file",
|
329 |
).launch()
|