Spaces:
Runtime error
Runtime error
Commit
·
f8d2495
1
Parent(s):
d6a0552
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ def classify_sentiment(audio, model):
|
|
| 8 |
pred = pipe(audio)
|
| 9 |
return {dic["label"]: dic["score"] for dic in pred}
|
| 10 |
|
| 11 |
-
input_audio = [gr.inputs.Audio(source="microphone", type="filepath", label="Record/ Drop audio"), gr.inputs.Dropdown(["
|
| 12 |
label = gr.outputs.Label(num_top_classes=5)
|
| 13 |
|
| 14 |
################### Gradio Web APP ################################
|
|
@@ -33,6 +33,6 @@ gr.Interface(
|
|
| 33 |
fn = classify_sentiment,
|
| 34 |
inputs = input_audio,
|
| 35 |
outputs = label,
|
| 36 |
-
#examples=[["test1.wav", "
|
| 37 |
theme="grass", description=description).launch()
|
| 38 |
|
|
|
|
| 8 |
pred = pipe(audio)
|
| 9 |
return {dic["label"]: dic["score"] for dic in pred}
|
| 10 |
|
| 11 |
+
input_audio = [gr.inputs.Audio(source="microphone", type="filepath", label="Record/ Drop audio"), gr.inputs.Dropdown(["hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD", "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"], label="Model Name")]
|
| 12 |
label = gr.outputs.Label(num_top_classes=5)
|
| 13 |
|
| 14 |
################### Gradio Web APP ################################
|
|
|
|
| 33 |
fn = classify_sentiment,
|
| 34 |
inputs = input_audio,
|
| 35 |
outputs = label,
|
| 36 |
+
#examples=[["test1.wav", "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD"], ["test2.wav", "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"]],
|
| 37 |
theme="grass", description=description).launch()
|
| 38 |
|