Spaces:
Sleeping
Sleeping
DanielDBGC
commited on
Commit
·
93e160d
1
Parent(s):
ebf272d
final?
Browse files
app.py
CHANGED
@@ -6,11 +6,7 @@ from transformers import pipeline
|
|
6 |
pipeline = pipeline("audio-classification", model="DanielDBGC/my_awesome_lang_class_mind_model")
|
7 |
|
8 |
def predict(input_sound):
|
9 |
-
|
10 |
-
dataset = dataset.cast_column("audio", Audio(sampling_rate=16000))
|
11 |
-
sampling_rate = dataset.features["audio"].sampling_rate
|
12 |
-
audio_file = dataset[0]["audio"]["path"]
|
13 |
-
predictions = pipeline(input_sound)
|
14 |
return {p["label"]: p["score"] for p in predictions}
|
15 |
|
16 |
gradio_app = gr.Interface(
|
|
|
6 |
pipeline = pipeline("audio-classification", model="DanielDBGC/my_awesome_lang_class_mind_model")
|
7 |
|
8 |
def predict(input_sound):
|
9 |
+
predictions = pipeline(input_sound[1])
|
|
|
|
|
|
|
|
|
10 |
return {p["label"]: p["score"] for p in predictions}
|
11 |
|
12 |
gradio_app = gr.Interface(
|