Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -133,9 +133,8 @@ def toggle_tts(password):
|
|
133 |
tts_password = password
|
134 |
|
135 |
checkbox = gr.Checkbox(label="Enable TTS") # remove the fn parameter
|
136 |
-
passwordInput = gr.Textbox(label="TTS Password", type="password",
|
137 |
|
138 |
-
checkbox.input(fn=lambda c: toggle_tts_label(c))
|
139 |
toggle_tts(passwordInput.value)
|
140 |
|
141 |
# Create a Gradio interface with the TTS checkbox and password input
|
@@ -152,5 +151,8 @@ demo = gr.ChatInterface(
|
|
152 |
additional_inputs=[checkbox, passwordInput]
|
153 |
)
|
154 |
|
|
|
|
|
|
|
155 |
|
156 |
demo.queue().launch(show_api=False)
|
|
|
133 |
tts_password = password
|
134 |
|
135 |
checkbox = gr.Checkbox(label="Enable TTS") # remove the fn parameter
|
136 |
+
passwordInput = gr.Textbox(label="TTS Password", type="password", visible=enable_tts)
|
137 |
|
|
|
138 |
toggle_tts(passwordInput.value)
|
139 |
|
140 |
# Create a Gradio interface with the TTS checkbox and password input
|
|
|
151 |
additional_inputs=[checkbox, passwordInput]
|
152 |
)
|
153 |
|
154 |
+
with demo:
|
155 |
+
checkbox.input(fn=toggle_tts_label(True))
|
156 |
+
|
157 |
|
158 |
demo.queue().launch(show_api=False)
|