Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -159,7 +159,7 @@ def generate_text(
|
|
159 |
else:
|
160 |
print("Not using TTS!")
|
161 |
|
162 |
-
return
|
163 |
|
164 |
|
165 |
|
@@ -167,14 +167,18 @@ def generate_text(
|
|
167 |
passwordInput = gr.Textbox(label="TTS Password", type="password")
|
168 |
mychatbot = gr.Chatbot(avatar_images=["./user.png", "./stella.jpg"], bubble_full_width=False, show_label=False, show_copy_button=True, likeable=True)
|
169 |
|
170 |
-
chat =
|
|
|
|
|
171 |
fn=generate_text,
|
172 |
chatbot=mychatbot,
|
173 |
title="Stella ",
|
174 |
retry_btn=None,
|
175 |
undo_btn=None,
|
176 |
additional_inputs=[passwordInput],
|
177 |
-
|
|
|
|
|
178 |
|
179 |
|
180 |
chat.launch(show_api=False)
|
|
|
159 |
else:
|
160 |
print("Not using TTS!")
|
161 |
|
162 |
+
return output, audio_output
|
163 |
|
164 |
|
165 |
|
|
|
167 |
passwordInput = gr.Textbox(label="TTS Password", type="password")
|
168 |
mychatbot = gr.Chatbot(avatar_images=["./user.png", "./stella.jpg"], bubble_full_width=False, show_label=False, show_copy_button=True, likeable=True)
|
169 |
|
170 |
+
chat =
|
171 |
+
|
172 |
+
with gr.ChatInterface(
|
173 |
fn=generate_text,
|
174 |
chatbot=mychatbot,
|
175 |
title="Stella ",
|
176 |
retry_btn=None,
|
177 |
undo_btn=None,
|
178 |
additional_inputs=[passwordInput],
|
179 |
+
):
|
180 |
+
audioBlock = gr.Audio(autoplay=True, interactive=False)
|
181 |
+
audioBlock.value = audio_output
|
182 |
|
183 |
|
184 |
chat.launch(show_api=False)
|