wasmdashai commited on
Commit
db75c95
·
verified ·
1 Parent(s): f5433d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -206,7 +206,8 @@ def t2tstream(text):
206
  st+=chk.text
207
  yield st
208
 
209
-
 
210
  #return get_answer_ai(text)
211
  import gradio as gr
212
  import os
@@ -365,6 +366,23 @@ with gr.Blocks() as demo: # Use gr.Blocks to wrap the entire interface
365
  text_inputk2 = gr.Textbox(label="أدخل النص هنا")
366
  text_out1 = gr.Textbox()
367
  text_inputk2.submit(t2tstream, [text_inputk2], [text_out1])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
 
369
 
370
 
 
206
  st+=chk.text
207
  yield st
208
 
209
+ def t2s(text,name_model):
210
+ return genrate_speech(text,name_model)
211
  #return get_answer_ai(text)
212
  import gradio as gr
213
  import os
 
366
  text_inputk2 = gr.Textbox(label="أدخل النص هنا")
367
  text_out1 = gr.Textbox()
368
  text_inputk2.submit(t2tstream, [text_inputk2], [text_out1])
369
+
370
+ with gr.Tab("T2S "):
371
+ gr.Markdown("## T2S ")
372
+ model_choices3 = gr.Dropdown(
373
+ choices=[
374
+ "wasmdashai/vits-ar-sa-huba-v1",
375
+ "wasmdashai/vits-ar-sa-huba",
376
+ "wasmdashai/vits-ar-sa-ms",
377
+ "wasmdashai/vits-ar-sa-A",
378
+ "wasmdashai/vits-ar-sa-huba-v2",
379
+ ],
380
+ label="اختر النموذج",
381
+ value="wasmdashai/vits-ar-sa-huba",
382
+ )
383
+ text_inputk3 = gr.Textbox(label="أدخل النص هنا")
384
+ oudio_out1 =gr.Audio()
385
+ text_inputk2.submit(t2s, [text_inputk3,model_choices3], [oudio_out1])
386
 
387
 
388