Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -75,25 +75,25 @@ def response(
|
|
75 |
|
76 |
yield AdditionalOutputs(chatbot)
|
77 |
|
78 |
-
# Create
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
|
96 |
-
# Create Stream with the
|
97 |
stream = Stream(
|
98 |
modality="audio",
|
99 |
mode="send-receive",
|
@@ -101,7 +101,7 @@ stream = Stream(
|
|
101 |
additional_outputs_handler=lambda a, b: b,
|
102 |
additional_inputs=[chatbot],
|
103 |
additional_outputs=[chatbot],
|
104 |
-
|
105 |
rtc_configuration=rtc_config
|
106 |
)
|
107 |
|
|
|
75 |
|
76 |
yield AdditionalOutputs(chatbot)
|
77 |
|
78 |
+
# Create Gradio interface
|
79 |
+
chatbot = gr.Chatbot(type="messages", height=500, label="Conversation")
|
80 |
+
|
81 |
+
# Define enhanced UI arguments
|
82 |
+
enhanced_ui_args = {
|
83 |
+
"title": "LLM Voice Chat (Powered by DeepSeek & ElevenLabs)",
|
84 |
+
"description": "Speak after clicking the microphone button below. Your conversation will appear in the chat.",
|
85 |
+
"theme": gr.themes.Soft(),
|
86 |
+
"css": """
|
87 |
+
.gradio-container {
|
88 |
+
min-height: 600px;
|
89 |
+
}
|
90 |
+
#chatbot {
|
91 |
+
min-height: 400px;
|
92 |
+
}
|
93 |
+
"""
|
94 |
+
}
|
95 |
|
96 |
+
# Create Stream with enhanced UI args and the RTC configuration
|
97 |
stream = Stream(
|
98 |
modality="audio",
|
99 |
mode="send-receive",
|
|
|
101 |
additional_outputs_handler=lambda a, b: b,
|
102 |
additional_inputs=[chatbot],
|
103 |
additional_outputs=[chatbot],
|
104 |
+
ui_args=enhanced_ui_args,
|
105 |
rtc_configuration=rtc_config
|
106 |
)
|
107 |
|