Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -110,23 +110,8 @@ custom_css = """
|
|
| 110 |
</style>
|
| 111 |
"""
|
| 112 |
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
demo = gr.Interface(
|
| 116 |
-
fn=predict_dialect,
|
| 117 |
-
inputs=gr.Audio(),
|
| 118 |
-
outputs=gr.Label(num_top_classes=5, label="Predicted Dialect"),
|
| 119 |
-
title="Tamyïz 🍉 Arabic Dialect Identification in Speech",
|
| 120 |
-
description="""
|
| 121 |
-
<div class="centered-content">
|
| 122 |
-
<img src="https://huggingface.co/badrex/mms-300m-arabic-dialect-identifier/resolve/main/assets/logo.png" alt="Logo" style="width: 200px; height: auto; margin-bottom: 20px;">
|
| 123 |
-
<br>
|
| 124 |
-
<div>
|
| 125 |
-
<p style="font-size: 16px; line-height: 1.6;">
|
| 126 |
-
Use this speech model to identify five major Arabic varieties from just a short audio clip.
|
| 127 |
-
</p>
|
| 128 |
-
<br>
|
| 129 |
-
<p style="font-size: 15px; line-height: 1.8;">
|
| 130 |
<strong>The following Arabic language varieties are supported:</strong>
|
| 131 |
<br><br>
|
| 132 |
✦ <strong>Modern Standard Arabic (MSA)</strong> - The formal language of media and education
|
|
@@ -140,20 +125,33 @@ demo = gr.Interface(
|
|
| 140 |
✦ <strong>Maghrebi Arabic</strong> - The distinctive varieties of Morocco, Algeria, Tunisia, and Libya
|
| 141 |
</p>
|
| 142 |
<br>
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
<br>
|
| 150 |
<p style="font-size: 13px;">
|
| 151 |
-
The demo is based on a Transformer model adapted for the ADI task
|
| 152 |
-
<a href="https://huggingface.co/badrex/mms-300m-arabic-dialect-identifier" style="color: #2563eb;">badrex/mms-300m-arabic-dialect-identifier</a>.
|
| 153 |
-
</p>
|
| 154 |
-
<p style="font-size: 13px;">
|
| 155 |
Developed with ❤️🤍💚 by <a href="https://badrex.github.io/" style="color: #2563eb;">Badr Alabsi</a>
|
| 156 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
</div>
|
| 158 |
</div>
|
| 159 |
""",
|
|
|
|
| 110 |
</style>
|
| 111 |
"""
|
| 112 |
|
| 113 |
+
"""
|
| 114 |
+
<p style="font-size: 15px; line-height: 1.8;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
<strong>The following Arabic language varieties are supported:</strong>
|
| 116 |
<br><br>
|
| 117 |
✦ <strong>Modern Standard Arabic (MSA)</strong> - The formal language of media and education
|
|
|
|
| 125 |
✦ <strong>Maghrebi Arabic</strong> - The distinctive varieties of Morocco, Algeria, Tunisia, and Libya
|
| 126 |
</p>
|
| 127 |
<br>
|
| 128 |
+
"""
|
| 129 |
+
|
| 130 |
+
# Create the Gradio interface
|
| 131 |
+
demo = gr.Interface(
|
| 132 |
+
fn=predict_dialect,
|
| 133 |
+
inputs=gr.Audio(),
|
| 134 |
+
outputs=gr.Label(num_top_classes=5, label="Predicted Dialect"),
|
| 135 |
+
title="Tamyïz 🍉 Arabic Dialect Identification in Speech",
|
| 136 |
+
description="""
|
| 137 |
+
<div class="centered-content">
|
| 138 |
+
<img src="https://huggingface.co/badrex/mms-300m-arabic-dialect-identifier/resolve/main/assets/logo.png" alt="Logo" style="width: 200px; height: auto; margin-bottom: 20px;">
|
| 139 |
+
<br>
|
| 140 |
+
<div>
|
| 141 |
+
<p>
|
| 142 |
+
This is a demo for the accurate and robust Transformer-based <a href="https://huggingface.co/badrex/mms-300m-arabic-dialect-identifier" style="color: #FF5349;">model</a> for Spoken Arabic Dialect Identification (ADI).
|
| 143 |
+
From just a short audio clip (5-10 seconds), the model can identify Modern Standard Arabic (<strong>MSA</strong>) as well as four major regional Arabic varieties: Egyptian Arabic, Gulf Arabic, Levantine Arabic, and Maghrebi Arabic.
|
| 144 |
+
|
| 145 |
<br>
|
| 146 |
<p style="font-size: 13px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
Developed with ❤️🤍💚 by <a href="https://badrex.github.io/" style="color: #2563eb;">Badr Alabsi</a>
|
| 148 |
</p>
|
| 149 |
+
|
| 150 |
+
<br>
|
| 151 |
+
|
| 152 |
+
<p>
|
| 153 |
+
Simply <strong>upload an audio file</strong> or <strong>record yourself speaking</strong> to try out the model!
|
| 154 |
+
</p>
|
| 155 |
</div>
|
| 156 |
</div>
|
| 157 |
""",
|