Spaces:
Sleeping
Sleeping
Commit
Β·
26958d6
1
Parent(s):
7b11221
Updated Gradio UI
Browse files
app.py
CHANGED
|
@@ -52,13 +52,22 @@ def predict_accent(audio):
|
|
| 52 |
label_map = {0: "Canadian English", 1: "England English"}
|
| 53 |
return label_map[predicted_class_id]
|
| 54 |
|
| 55 |
-
# Gradio
|
| 56 |
interface = gr.Interface(
|
| 57 |
fn=predict_accent,
|
| 58 |
-
inputs=gr.Audio(sources=["upload", "microphone"], type="filepath", label="Upload or Record Audio (WAV)"),
|
| 59 |
-
outputs=gr.Textbox(label="Predicted Accent"),
|
| 60 |
-
title="Accent Classification",
|
| 61 |
-
description="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
allow_flagging="never"
|
| 63 |
)
|
| 64 |
|
|
|
|
| 52 |
label_map = {0: "Canadian English", 1: "England English"}
|
| 53 |
return label_map[predicted_class_id]
|
| 54 |
|
| 55 |
+
# Gradio Interface
|
| 56 |
interface = gr.Interface(
|
| 57 |
fn=predict_accent,
|
| 58 |
+
inputs=gr.Audio(sources=["upload", "microphone"], type="filepath", label="π€ Upload or Record Audio (WAV)"),
|
| 59 |
+
outputs=gr.Textbox(label="π£οΈ Predicted Accent"),
|
| 60 |
+
title="π Accent Classification App",
|
| 61 |
+
description="""
|
| 62 |
+
This app uses a fine-tuned **Wav2Vec2** model to classify English accents as either **Canadian** or **England**.
|
| 63 |
+
It supports both audio upload and direct recording.
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
π¨βπ» **Author**: [Anand Purushottam](https://www.linkedin.com/in/creativepurus/)
|
| 68 |
+
π [GitHub: creativepurus](https://github.com/creativepurus)
|
| 69 |
+
|
| 70 |
+
""",
|
| 71 |
allow_flagging="never"
|
| 72 |
)
|
| 73 |
|