Spaces:
Runtime error
Runtime error
import gradio as gr | |
import sklearn | |
import joblib | |
model = joblib.load("snare_kick_classifier.joblib") | |
def classify(audio): | |
return model.predict([audio])[0] | |
gr.Interface(fn=classify, | |
inputs=gr.inputs.Audio(source="microphone", type="file", label="Audio"), | |
outputs="text", | |
title="Kick or Snare?", | |
description="A simple classifier that tells you whether the sound you're playing is a kick or a snare.", | |
).launch() | |