jspr commited on
Commit
7ea49cd
1 Parent(s): d29d60a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import sklearn
3
+ import joblib
4
+
5
+ model = joblib.load("snare_kick_classifier.joblib")
6
+
7
+ def classify(audio):
8
+ return model.predict([audio])[0]
9
+
10
+ gr.Interface(fn=classify,
11
+ inputs=gr.inputs.Audio(source="microphone", type="file", label="Audio"),
12
+ outputs="text",
13
+ title="Kick or Snare?",
14
+ description="A simple classifier that tells you whether the sound you're playing is a kick or a snare.",
15
+ ).launch()