Spaces:
Runtime error
Runtime error
ASG Models
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,9 +42,16 @@ def get_answer_ai(text):
|
|
| 42 |
AI=create_chat_session()
|
| 43 |
response = AI.send_message(text)
|
| 44 |
return response.text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
model_choices = gr.Dropdown(
|
| 46 |
choices=["asg2024/vits-ar-sa", "asg2024/vits-ar-sa-huba", "asg2024/vits-ar-sa-ms"], # Replace with your model names
|
| 47 |
-
label="
|
| 48 |
value="asg2024/vits-ar-sa" # Default selection
|
| 49 |
)
|
| 50 |
|
|
@@ -62,7 +69,7 @@ def reverse_audio(text,model_choice):
|
|
| 62 |
|
| 63 |
demo = gr.Interface(
|
| 64 |
fn=reverse_audio,
|
| 65 |
-
inputs=[
|
| 66 |
outputs=["audio","audio","text"],
|
| 67 |
title=" محادثة صوتية بالذكاء الاصطناعي باللهجة السعودية "
|
| 68 |
)
|
|
|
|
| 42 |
AI=create_chat_session()
|
| 43 |
response = AI.send_message(text)
|
| 44 |
return response.text
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
text_input = gr.Textbox(label="ُEnter any text")
|
| 48 |
+
user_audio = gr.Audio(label="Your Speech")
|
| 49 |
+
ai_audio = gr.Audio(label="AI Response Speech")
|
| 50 |
+
ai_text = gr.Textbox(label="AI Response Text")
|
| 51 |
+
|
| 52 |
model_choices = gr.Dropdown(
|
| 53 |
choices=["asg2024/vits-ar-sa", "asg2024/vits-ar-sa-huba", "asg2024/vits-ar-sa-ms"], # Replace with your model names
|
| 54 |
+
label="Choose Model",
|
| 55 |
value="asg2024/vits-ar-sa" # Default selection
|
| 56 |
)
|
| 57 |
|
|
|
|
| 69 |
|
| 70 |
demo = gr.Interface(
|
| 71 |
fn=reverse_audio,
|
| 72 |
+
inputs=[text_input,model_choices],
|
| 73 |
outputs=["audio","audio","text"],
|
| 74 |
title=" محادثة صوتية بالذكاء الاصطناعي باللهجة السعودية "
|
| 75 |
)
|