Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import tempfile
|
|
9 |
learn = load_learner('model.pkl')
|
10 |
labels = learn.dls.vocab
|
11 |
|
12 |
-
def audio_to_spectrogram(audio_file):
|
13 |
if audio_file.endswith('.mp3'):
|
14 |
with tempfile.NamedTemporaryFile(suffix='.wav') as temp_wav:
|
15 |
audio = AudioSegment.from_mp3(audio_file)
|
|
|
9 |
learn = load_learner('model.pkl')
|
10 |
labels = learn.dls.vocab
|
11 |
|
12 |
+
def audio_to_spectrogram(audio_file):
|
13 |
if audio_file.endswith('.mp3'):
|
14 |
with tempfile.NamedTemporaryFile(suffix='.wav') as temp_wav:
|
15 |
audio = AudioSegment.from_mp3(audio_file)
|