mzltest commited on
Commit
e89607f
·
1 Parent(s): 98e173b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from basic_pitch.inference import predict_and_save
3
+ def predict(ina):
4
+ predict_and_save(
5
+ [ina],
6
+ '/tmp/',
7
+ True,
8
+ True,
9
+ False,
10
+ False,
11
+ )
12
+ return f'{ina}.wav',f'{ina}.mid'
13
+ aud=gr.Audio(type='filepath')
14
+ oa=gr.Audio()
15
+ pf=gr.File()
16
+ demo = gr.Interface(fn=image_classifier, inputs=[aud], outputs=[oa,pf])
17
+ demo.launch()