Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -211,6 +211,7 @@ def t2s(text,name_model):
|
|
| 211 |
#return get_answer_ai(text)
|
| 212 |
|
| 213 |
|
|
|
|
| 214 |
def home_page():
|
| 215 |
return """
|
| 216 |
<div class="px-4 py-5 my-5 text-center">
|
|
@@ -219,7 +220,9 @@ def home_page():
|
|
| 219 |
<div class="col-lg-6 mx-auto">
|
| 220 |
<p class="lead mb-4">
|
| 221 |
Wasm-Speeker هو إطار متقدم يعتمد على تقنيات الذكاء الاصطناعي لتوليد الكلام من النصوص.
|
|
|
|
| 222 |
تعتمد جميع النماذج على بنية VITS، التي تتيح توليد موجات صوتية واقعية بناءً على المدخلات النصية.
|
|
|
|
| 223 |
النماذج تحتوي على محولات لتحليل النص وتوليد الكلام بناءً على خصائص الصوت المحلية لكل لهجة.
|
| 224 |
</p>
|
| 225 |
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
|
|
@@ -228,22 +231,11 @@ def home_page():
|
|
| 228 |
</div>
|
| 229 |
</div>
|
| 230 |
</div>
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
<h2>مميزات Wasm-Speeker:</h2>
|
| 237 |
-
<ul>
|
| 238 |
-
<li>التخصص في اللهجة السعودية.</li>
|
| 239 |
-
<li>سهولة التدريب.</li>
|
| 240 |
-
<li>الأداء المتوازن.</li>
|
| 241 |
-
<li>الاستخدام الفعال للموارد.</li>
|
| 242 |
-
<li>الشعبية والانتشار.</li>
|
| 243 |
-
<li>حجم النموذج: 36.3 مليون باراميتر.</li>
|
| 244 |
-
</ul>
|
| 245 |
-
</div>
|
| 246 |
-
<div class="container col-xxl-8 px-4 py-5">
|
| 247 |
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
|
| 248 |
<div class="col-10 col-sm-8 col-lg-6">
|
| 249 |
<img src="bootstrap-themes.png" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500" loading="lazy">
|
|
@@ -282,8 +274,9 @@ def home_page():
|
|
| 282 |
</div>
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
-
</div>
|
| 286 |
-
|
|
|
|
| 287 |
import gradio as gr
|
| 288 |
import os
|
| 289 |
import plotly.express as px
|
|
@@ -362,6 +355,35 @@ with gr.Blocks() as demo: # Use gr.Blocks to wrap the entire interface
|
|
| 362 |
|
| 363 |
with gr.Tab("الصفحة الرئيسية"):
|
| 364 |
gr.HTML(home_page())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 365 |
with gr.Tab("ChatBot "):
|
| 366 |
chatbot = gr.Chatbot(
|
| 367 |
elem_id="chatbot",
|
|
|
|
| 211 |
#return get_answer_ai(text)
|
| 212 |
|
| 213 |
|
| 214 |
+
|
| 215 |
def home_page():
|
| 216 |
return """
|
| 217 |
<div class="px-4 py-5 my-5 text-center">
|
|
|
|
| 220 |
<div class="col-lg-6 mx-auto">
|
| 221 |
<p class="lead mb-4">
|
| 222 |
Wasm-Speeker هو إطار متقدم يعتمد على تقنيات الذكاء الاصطناعي لتوليد الكلام من النصوص.
|
| 223 |
+
|
| 224 |
تعتمد جميع النماذج على بنية VITS، التي تتيح توليد موجات صوتية واقعية بناءً على المدخلات النصية.
|
| 225 |
+
|
| 226 |
النماذج تحتوي على محولات لتحليل النص وتوليد الكلام بناءً على خصائص الصوت المحلية لكل لهجة.
|
| 227 |
</p>
|
| 228 |
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
|
|
|
|
| 231 |
</div>
|
| 232 |
</div>
|
| 233 |
</div>
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
"""
|
| 237 |
+
def footer():
|
| 238 |
+
body="""<div class="container col-xxl-8 px-4 py-5">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
|
| 240 |
<div class="col-10 col-sm-8 col-lg-6">
|
| 241 |
<img src="bootstrap-themes.png" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500" loading="lazy">
|
|
|
|
| 274 |
</div>
|
| 275 |
</div>
|
| 276 |
</div>
|
| 277 |
+
</div>"""
|
| 278 |
+
return body
|
| 279 |
+
|
| 280 |
import gradio as gr
|
| 281 |
import os
|
| 282 |
import plotly.express as px
|
|
|
|
| 355 |
|
| 356 |
with gr.Tab("الصفحة الرئيسية"):
|
| 357 |
gr.HTML(home_page())
|
| 358 |
+
gr.Markdown("## مميزات Wasm-Speeker")
|
| 359 |
+
|
| 360 |
+
with gr.Row():
|
| 361 |
+
with gr.Column():
|
| 362 |
+
gr.Markdown("### 🛠 التخصص في اللهجة السعودية")
|
| 363 |
+
gr.Markdown("Wasm-Speeker متخصص في إنتاج أصوات واقعية للهجة السعودية.")
|
| 364 |
+
|
| 365 |
+
with gr.Column():
|
| 366 |
+
gr.Markdown("### 🎯 سهولة التدريب")
|
| 367 |
+
gr.Markdown("يتميز Wasm-Speeker بسهولة التدريب وقابلية التوسع.")
|
| 368 |
+
|
| 369 |
+
with gr.Column():
|
| 370 |
+
gr.Markdown("### ⚖️ الأداء المتوازن")
|
| 371 |
+
gr.Markdown("يوفر أداءً متوازناً يجمع بين الجودة والسرعة.")
|
| 372 |
+
|
| 373 |
+
with gr.Row():
|
| 374 |
+
with gr.Column():
|
| 375 |
+
gr.Markdown("### ⚡️ الاستخدام الفعال للموارد")
|
| 376 |
+
gr.Markdown("تم تصميمه لاستخدام الموارد بفعالية وكفاءة.")
|
| 377 |
+
|
| 378 |
+
with gr.Column():
|
| 379 |
+
gr.Markdown("### 🌍 الشعبية والانتشار")
|
| 380 |
+
gr.Markdown("نموذج واسع الانتشار بين المطورين في تطبيقات مختلفة.")
|
| 381 |
+
|
| 382 |
+
with gr.Column():
|
| 383 |
+
gr.Markdown("### 💾 حجم النموذج")
|
| 384 |
+
gr.Markdown("يحتوي النموذج على 36.3 مليون باراميتر.")
|
| 385 |
+
|
| 386 |
+
gr.HTML(footer())
|
| 387 |
with gr.Tab("ChatBot "):
|
| 388 |
chatbot = gr.Chatbot(
|
| 389 |
elem_id="chatbot",
|