Spaces:
Runtime error
Runtime error
jesse-lopez
commited on
Commit
•
76168a0
1
Parent(s):
e982ae0
Use model pushed to hf-hub
Browse files- app.py +4 -2
- fish-sounds-resnet101-balanced-samples-n50 +0 -1
app.py
CHANGED
@@ -8,6 +8,7 @@ import io
|
|
8 |
import fastai.vision.all as fai_vision
|
9 |
import gradio as gr
|
10 |
import numpy as np
|
|
|
11 |
from PIL import Image
|
12 |
|
13 |
from create_spectrograms import (
|
@@ -19,7 +20,7 @@ from create_spectrograms import (
|
|
19 |
)
|
20 |
|
21 |
|
22 |
-
MODEL =
|
23 |
LABELS = {
|
24 |
0: 'No call',
|
25 |
1: 'Black grouper call 1',
|
@@ -74,6 +75,7 @@ iface = gr.Interface(
|
|
74 |
gr.outputs.Image(),
|
75 |
gr.outputs.Label(num_top_classes=3),
|
76 |
],
|
77 |
-
examples=["sample-0002.wav", "sample-20088.wav", "sample-2990.wav"]
|
|
|
78 |
)
|
79 |
iface.launch()
|
|
|
8 |
import fastai.vision.all as fai_vision
|
9 |
import gradio as gr
|
10 |
import numpy as np
|
11 |
+
from huggingface_hub import from_pretrained_fastai
|
12 |
from PIL import Image
|
13 |
|
14 |
from create_spectrograms import (
|
|
|
20 |
)
|
21 |
|
22 |
|
23 |
+
MODEL = from_pretrained_fastai('axds/classify-fish-sounds')
|
24 |
LABELS = {
|
25 |
0: 'No call',
|
26 |
1: 'Black grouper call 1',
|
|
|
75 |
gr.outputs.Image(),
|
76 |
gr.outputs.Label(num_top_classes=3),
|
77 |
],
|
78 |
+
examples=["sample-0002.wav", "sample-20088.wav", "sample-2990.wav"],
|
79 |
+
title="Classify fish sounds from audio files"
|
80 |
)
|
81 |
iface.launch()
|
fish-sounds-resnet101-balanced-samples-n50
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
../../models/fish-sounds-resnet101-balanced-samples-n50
|
|
|
|