Spaces:
Running
on
Zero
Running
on
Zero
Reorganize clear button initialization in TTS demo
Browse files
app.py
CHANGED
@@ -257,8 +257,6 @@ with gr.Blocks(title="Kokoro TTS Demo", css="""
|
|
257 |
show_label=False,
|
258 |
show_copy_button=True # Add copy button for convenience
|
259 |
)
|
260 |
-
clear_btn = gr.Button("Clear Text", variant="secondary")
|
261 |
-
|
262 |
label_html = gr.HTML(initial_label)
|
263 |
# Update label whenever text changes
|
264 |
text_input.change(
|
@@ -268,6 +266,7 @@ with gr.Blocks(title="Kokoro TTS Demo", css="""
|
|
268 |
trigger_mode="always_last"
|
269 |
)
|
270 |
|
|
|
271 |
|
272 |
def clear_text():
|
273 |
return "", '<div class="token-label">Text to speak</div>'
|
|
|
257 |
show_label=False,
|
258 |
show_copy_button=True # Add copy button for convenience
|
259 |
)
|
|
|
|
|
260 |
label_html = gr.HTML(initial_label)
|
261 |
# Update label whenever text changes
|
262 |
text_input.change(
|
|
|
266 |
trigger_mode="always_last"
|
267 |
)
|
268 |
|
269 |
+
clear_btn = gr.Button("Clear Text", variant="secondary")
|
270 |
|
271 |
def clear_text():
|
272 |
return "", '<div class="token-label">Text to speak</div>'
|