Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,29 @@ def transcribe(audio):
|
|
25 |
return transcriber({"sampling_rate": sr, "raw": y})["text"]
|
26 |
|
27 |
demo = gr.Interface(
|
28 |
-
transcribe,
|
29 |
-
gr.Audio(
|
30 |
-
"text",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
)
|
32 |
|
33 |
if __name__ == "__main__":
|
|
|
25 |
return transcriber({"sampling_rate": sr, "raw": y})["text"]
|
26 |
|
27 |
demo = gr.Interface(
|
28 |
+
fn=transcribe,
|
29 |
+
inputs=gr.Audio(),
|
30 |
+
outputs="text",
|
31 |
+
title="JASR 🐐 Dialectal Arabic ASR",
|
32 |
+
description="""
|
33 |
+
<div class="centered-content">
|
34 |
+
<div>
|
35 |
+
<p>
|
36 |
+
By <a href="https://badrex.github.io/" style="color: #2563eb;">Badr al-Absi</a> with ❤️🤍💚
|
37 |
+
</p>
|
38 |
+
<br>
|
39 |
+
<p style="font-size: 15px; line-height: 1.8;">
|
40 |
+
This is JASR, pronounced Jasir, an automatic speech recognition system optimized for the regional dialects of <i>Jazirat al-Arab</i>, or the Arabian Peninsula. The model is a fine-tune of the speech foundation model <https://huggingface.co/facebook/w2v-bert-2.0" style="color: #FF5349;">w2v-BERT 2.0</a>, a 580M pre-trained speech encoder.
|
41 |
+
<br>
|
42 |
+
<p style="font-size: 15px; line-height: 1.8;">
|
43 |
+
Simply <strong>upload an audio file</strong> 📤 or <strong>record yourself speaking</strong> 🎙️⏺️ to try out the model!
|
44 |
+
</p>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
""",
|
48 |
+
examples=examples if examples else None,
|
49 |
+
cache_examples=False, # Disable caching to avoid issues
|
50 |
+
flagging_mode=None,
|
51 |
)
|
52 |
|
53 |
if __name__ == "__main__":
|