i hate ui v5657
Browse files
app.py
CHANGED
|
@@ -291,13 +291,35 @@ with gr.Blocks(title="Parakeet-TDT v3 (Unified MALSD Beam)") as demo:
|
|
| 291 |
# Header
|
| 292 |
gr.Markdown("### RELEASE: GIGA-CHAD-v.0.7")
|
| 293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
# Interactive Tabs
|
| 295 |
with gr.Tab("Mic"):
|
| 296 |
# Live audio input and output components
|
| 297 |
mic = gr.Audio(
|
| 298 |
sources=["microphone"], type="numpy", streaming=True, label="Speak"
|
| 299 |
)
|
| 300 |
-
text_out = gr.Textbox(label="Transcript", lines=
|
| 301 |
flush_btn = gr.Button("Flush")
|
| 302 |
|
| 303 |
# Session state for maintaining context across streams
|
|
@@ -319,8 +341,9 @@ with gr.Blocks(title="Parakeet-TDT v3 (Unified MALSD Beam)") as demo:
|
|
| 319 |
results_table = gr.Dataframe(
|
| 320 |
headers=["file", "text"],
|
| 321 |
label="Results",
|
| 322 |
-
row_count=(
|
| 323 |
col_count=(2, "fixed"),
|
|
|
|
| 324 |
)
|
| 325 |
# Event: Process uploaded files and update table
|
| 326 |
run_btn.click(files_run, inputs=[files], outputs=[results_table])
|
|
@@ -393,27 +416,6 @@ with gr.Blocks(title="Parakeet-TDT v3 (Unified MALSD Beam)") as demo:
|
|
| 393 |
)
|
| 394 |
gr.HTML(highlights_html)
|
| 395 |
|
| 396 |
-
# Features Table (Static Data)
|
| 397 |
-
features_data = [
|
| 398 |
-
["Model Setup", "Loads Parakeet-TDT-0.6b-v3 (RNNT-based) with MALSD "
|
| 399 |
-
"decoding for beam exploration and loop labels for alignments."],
|
| 400 |
-
["Audio Handling", "Resamples to 16kHz mono, supports various formats."],
|
| 401 |
-
["Streaming (Mic)", "Partial hypotheses for seamless updates, "
|
| 402 |
-
"session-based for multi-chunk context."],
|
| 403 |
-
["UI", "Gradio tabs—Mic for live input/output (flush to finalize), "
|
| 404 |
-
"Files for batch results table."],
|
| 405 |
-
["Tech Stack", "NeMo (ASR core), Gradio (web UI), Torchaudio/Soundfile "
|
| 406 |
-
"(audio utils)."],
|
| 407 |
-
]
|
| 408 |
-
gr.Dataframe(
|
| 409 |
-
value=features_data,
|
| 410 |
-
headers=["Feature", "Description"],
|
| 411 |
-
datatype=["text", "text"],
|
| 412 |
-
row_count=(len(features_data), "fixed"),
|
| 413 |
-
col_count=(2, "fixed"),
|
| 414 |
-
interactive=False,
|
| 415 |
-
)
|
| 416 |
-
|
| 417 |
# TODO Section
|
| 418 |
todo_html = (
|
| 419 |
"<h3>TODO:</h3>"
|
|
@@ -426,4 +428,6 @@ with gr.Blocks(title="Parakeet-TDT v3 (Unified MALSD Beam)") as demo:
|
|
| 426 |
)
|
| 427 |
gr.HTML(todo_html)
|
| 428 |
|
|
|
|
|
|
|
| 429 |
demo.queue().launch(ssr_mode=False)
|
|
|
|
| 291 |
# Header
|
| 292 |
gr.Markdown("### RELEASE: GIGA-CHAD-v.0.7")
|
| 293 |
|
| 294 |
+
# Features Table (Static Data) - Moved here for prominence after title
|
| 295 |
+
features_data = [
|
| 296 |
+
["Model Setup", "Loads Parakeet-TDT-0.6b-v3 (RNNT-based) with MALSD "
|
| 297 |
+
"decoding for beam exploration and loop labels for alignments."],
|
| 298 |
+
["Audio Handling", "Resamples to 16kHz mono, supports various formats."],
|
| 299 |
+
["Streaming (Mic)", "Partial hypotheses for seamless updates, "
|
| 300 |
+
"session-based for multi-chunk context."],
|
| 301 |
+
["UI", "Gradio tabs—Mic for live input/output (flush to finalize), "
|
| 302 |
+
"Files for batch results table."],
|
| 303 |
+
["Tech Stack", "NeMo (ASR core), Gradio (web UI), Torchaudio/Soundfile "
|
| 304 |
+
"(audio utils)."],
|
| 305 |
+
]
|
| 306 |
+
gr.Dataframe(
|
| 307 |
+
value=features_data,
|
| 308 |
+
headers=["Feature", "Description"],
|
| 309 |
+
datatype=["text", "text"],
|
| 310 |
+
row_count=(len(features_data), "fixed"),
|
| 311 |
+
col_count=(2, "fixed"),
|
| 312 |
+
interactive=False,
|
| 313 |
+
wrap=True, # Ensures text wraps for better visibility in cells
|
| 314 |
+
)
|
| 315 |
+
|
| 316 |
# Interactive Tabs
|
| 317 |
with gr.Tab("Mic"):
|
| 318 |
# Live audio input and output components
|
| 319 |
mic = gr.Audio(
|
| 320 |
sources=["microphone"], type="numpy", streaming=True, label="Speak"
|
| 321 |
)
|
| 322 |
+
text_out = gr.Textbox(label="Transcript", lines=4) # Reduced height for visibility
|
| 323 |
flush_btn = gr.Button("Flush")
|
| 324 |
|
| 325 |
# Session state for maintaining context across streams
|
|
|
|
| 341 |
results_table = gr.Dataframe(
|
| 342 |
headers=["file", "text"],
|
| 343 |
label="Results",
|
| 344 |
+
row_count=(5, "dynamic"), # Limited initial rows for smaller window
|
| 345 |
col_count=(2, "fixed"),
|
| 346 |
+
wrap=True, # Text wraps to keep visible without horizontal scroll
|
| 347 |
)
|
| 348 |
# Event: Process uploaded files and update table
|
| 349 |
run_btn.click(files_run, inputs=[files], outputs=[results_table])
|
|
|
|
| 416 |
)
|
| 417 |
gr.HTML(highlights_html)
|
| 418 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 419 |
# TODO Section
|
| 420 |
todo_html = (
|
| 421 |
"<h3>TODO:</h3>"
|
|
|
|
| 428 |
)
|
| 429 |
gr.HTML(todo_html)
|
| 430 |
|
| 431 |
+
# Launch Configuration
|
| 432 |
+
# Note: ssr_mode=False disables server-side rendering for better real-time streaming performance.
|
| 433 |
demo.queue().launch(ssr_mode=False)
|