creativepurus commited on
Commit
26958d6
Β·
1 Parent(s): 7b11221

Updated Gradio UI

Browse files
Files changed (1) hide show
  1. app.py +14 -5
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 UI
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="This app classifies English accents as either Canadian or England using a fine-tuned Wav2Vec2 model.",
 
 
 
 
 
 
 
 
 
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