Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -128,6 +128,10 @@ def generate(
|
|
| 128 |
# Return None if the TTS is not enabled or the password is incorrect
|
| 129 |
return None
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
with gr.ChatInterface(
|
| 132 |
fn=generate,
|
| 133 |
chatbot=mychatbot,
|
|
@@ -136,10 +140,8 @@ with gr.ChatInterface(
|
|
| 136 |
undo_btn=None,
|
| 137 |
additional_inputs=[checkbox, passwordInput],
|
| 138 |
) as iface:
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
mychatbot = gr.Chatbot(avatar_images=["./user.png", "./stella.jpg"], bubble_full_width=False, show_label=False, show_copy_button=True, likeable=True)
|
| 142 |
-
audio_output = gr.Audio()
|
| 143 |
|
| 144 |
|
| 145 |
|
|
|
|
| 128 |
# Return None if the TTS is not enabled or the password is incorrect
|
| 129 |
return None
|
| 130 |
|
| 131 |
+
checkbox = gr.Checkbox(label="Enable TTS")
|
| 132 |
+
passwordInput = gr.Textbox(label="TTS Password", type="password")
|
| 133 |
+
mychatbot = gr.Chatbot(avatar_images=["./user.png", "./stella.jpg"], bubble_full_width=False, show_label=False, show_copy_button=True, likeable=True)
|
| 134 |
+
|
| 135 |
with gr.ChatInterface(
|
| 136 |
fn=generate,
|
| 137 |
chatbot=mychatbot,
|
|
|
|
| 140 |
undo_btn=None,
|
| 141 |
additional_inputs=[checkbox, passwordInput],
|
| 142 |
) as iface:
|
| 143 |
+
|
| 144 |
+
audio_output = gr.Audio(autoplay=True)
|
|
|
|
|
|
|
| 145 |
|
| 146 |
|
| 147 |
|