Update app.py
Browse files
app.py
CHANGED
@@ -1421,12 +1421,12 @@ def create_chatbot_interface():
|
|
1421 |
voice_status = gr.Textbox(label="Voice Status", value="No voice saved yet")
|
1422 |
|
1423 |
# Language selector and controls for chat
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
clear_btn = gr.Button("🧹 Clear Chat", scale=0)
|
1431 |
|
1432 |
# Chat display area
|
@@ -1438,15 +1438,15 @@ def create_chatbot_interface():
|
|
1438 |
elem_classes=["chat-window"]
|
1439 |
)
|
1440 |
|
1441 |
-
#
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
|
1451 |
# Audio output for the bot's response
|
1452 |
audio_output = gr.Audio(
|
@@ -1456,12 +1456,12 @@ def create_chatbot_interface():
|
|
1456 |
visible=True
|
1457 |
)
|
1458 |
|
1459 |
-
#
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
|
1466 |
# Input area with separate components
|
1467 |
with gr.Row(elem_classes=["input-area"]):
|
|
|
1421 |
voice_status = gr.Textbox(label="Voice Status", value="No voice saved yet")
|
1422 |
|
1423 |
# Language selector and controls for chat
|
1424 |
+
with gr.Row(elem_classes=["chat-controls"]):
|
1425 |
+
language_selector = gr.Dropdown(
|
1426 |
+
choices=["ml-IN", "en-US", "hi-IN", "ta-IN", "te-IN", "kn-IN"],
|
1427 |
+
value="ml-IN",
|
1428 |
+
label="Speech Recognition Language"
|
1429 |
+
)
|
1430 |
clear_btn = gr.Button("🧹 Clear Chat", scale=0)
|
1431 |
|
1432 |
# Chat display area
|
|
|
1438 |
elem_classes=["chat-window"]
|
1439 |
)
|
1440 |
|
1441 |
+
# Progress bar for TTS generation
|
1442 |
+
with gr.Row():
|
1443 |
+
tts_progress = gr.Slider(
|
1444 |
+
minimum=0,
|
1445 |
+
maximum=100,
|
1446 |
+
value=0,
|
1447 |
+
label="TTS Progress",
|
1448 |
+
interactive=False
|
1449 |
+
)
|
1450 |
|
1451 |
# Audio output for the bot's response
|
1452 |
audio_output = gr.Audio(
|
|
|
1456 |
visible=True
|
1457 |
)
|
1458 |
|
1459 |
+
# Status message for debugging
|
1460 |
+
status_msg = gr.Textbox(
|
1461 |
+
label="Status",
|
1462 |
+
value="Ready",
|
1463 |
+
interactive=False
|
1464 |
+
)
|
1465 |
|
1466 |
# Input area with separate components
|
1467 |
with gr.Row(elem_classes=["input-area"]):
|