Spaces:
Sleeping
Sleeping
reorgnize the UI
Browse files
app.py
CHANGED
|
@@ -527,6 +527,45 @@ with gr.Blocks(
|
|
| 527 |
(https://github.com/siddhu001/espnet/tree/sds_demo_recipe/egs2/TEMPLATE/sds1#how-to-use).
|
| 528 |
"""
|
| 529 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 530 |
with gr.Row():
|
| 531 |
with gr.Column(scale=1):
|
| 532 |
user_audio = gr.Audio(
|
|
@@ -536,48 +575,6 @@ with gr.Blocks(
|
|
| 536 |
format="wav",
|
| 537 |
)
|
| 538 |
process_btn = gr.Button("Process Audio", variant="primary")
|
| 539 |
-
input_text=gr.Textbox(
|
| 540 |
-
label="LLM prompt",
|
| 541 |
-
visible=True,
|
| 542 |
-
interactive=True,
|
| 543 |
-
value=default_instruct
|
| 544 |
-
)
|
| 545 |
-
with gr.Row():
|
| 546 |
-
type_radio = gr.Radio(
|
| 547 |
-
choices=["Cascaded"],
|
| 548 |
-
label="Choose type of Spoken Dialog:",
|
| 549 |
-
value="Cascaded",
|
| 550 |
-
)
|
| 551 |
-
with gr.Row():
|
| 552 |
-
ASR_radio = gr.Radio(
|
| 553 |
-
choices=ASR_options,
|
| 554 |
-
label="Choose ASR:",
|
| 555 |
-
value=ASR_name,
|
| 556 |
-
)
|
| 557 |
-
with gr.Row():
|
| 558 |
-
LLM_radio = gr.Radio(
|
| 559 |
-
choices=LLM_options,
|
| 560 |
-
label="Choose LLM:",
|
| 561 |
-
value=LLM_name,
|
| 562 |
-
)
|
| 563 |
-
with gr.Row():
|
| 564 |
-
radio = gr.Radio(
|
| 565 |
-
choices=TTS_display_names,
|
| 566 |
-
label="Choose TTS:",
|
| 567 |
-
value=TTS_reverse_map[TTS_name],
|
| 568 |
-
)
|
| 569 |
-
with gr.Row():
|
| 570 |
-
E2Eradio = gr.Radio(
|
| 571 |
-
choices=["mini-omni"],
|
| 572 |
-
label="Choose E2E model:",
|
| 573 |
-
value="mini-omni",
|
| 574 |
-
visible=False,
|
| 575 |
-
)
|
| 576 |
-
gr.Examples(
|
| 577 |
-
examples=[[row[1], row[2]] for row in examples],
|
| 578 |
-
inputs=[input_text, radio],
|
| 579 |
-
label="Usage examples",
|
| 580 |
-
)
|
| 581 |
with gr.Column(scale=1):
|
| 582 |
output_asr_text = gr.Textbox(label="ASR Transcription", interactive=False)
|
| 583 |
output_text = gr.Textbox(label="LLM Response", interactive=False)
|
|
|
|
| 527 |
(https://github.com/siddhu001/espnet/tree/sds_demo_recipe/egs2/TEMPLATE/sds1#how-to-use).
|
| 528 |
"""
|
| 529 |
)
|
| 530 |
+
input_text = gr.Textbox(
|
| 531 |
+
label="LLM prompt",
|
| 532 |
+
visible=True,
|
| 533 |
+
interactive=True,
|
| 534 |
+
value=default_instruct,
|
| 535 |
+
)
|
| 536 |
+
with gr.Row():
|
| 537 |
+
type_radio = gr.Radio(
|
| 538 |
+
choices=["Cascaded"],
|
| 539 |
+
label="Choose type of Spoken Dialog:",
|
| 540 |
+
value="Cascaded",
|
| 541 |
+
)
|
| 542 |
+
ASR_radio = gr.Radio(
|
| 543 |
+
choices=ASR_options,
|
| 544 |
+
label="Choose ASR:",
|
| 545 |
+
value=ASR_name,
|
| 546 |
+
)
|
| 547 |
+
LLM_radio = gr.Radio(
|
| 548 |
+
choices=LLM_options,
|
| 549 |
+
label="Choose LLM:",
|
| 550 |
+
value=LLM_name,
|
| 551 |
+
)
|
| 552 |
+
with gr.Column(scale=0.5):
|
| 553 |
+
radio = gr.Radio(
|
| 554 |
+
choices=TTS_display_names,
|
| 555 |
+
label="Choose TTS:",
|
| 556 |
+
value=TTS_reverse_map[TTS_name],
|
| 557 |
+
)
|
| 558 |
+
E2Eradio = gr.Radio(
|
| 559 |
+
choices=["mini-omni"],
|
| 560 |
+
label="Choose E2E model:",
|
| 561 |
+
value="mini-omni",
|
| 562 |
+
visible=False,
|
| 563 |
+
)
|
| 564 |
+
gr.Examples(
|
| 565 |
+
examples=[[row[1], row[2]] for row in examples],
|
| 566 |
+
inputs=[input_text, radio],
|
| 567 |
+
label="Usage examples",
|
| 568 |
+
)
|
| 569 |
with gr.Row():
|
| 570 |
with gr.Column(scale=1):
|
| 571 |
user_audio = gr.Audio(
|
|
|
|
| 575 |
format="wav",
|
| 576 |
)
|
| 577 |
process_btn = gr.Button("Process Audio", variant="primary")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 578 |
with gr.Column(scale=1):
|
| 579 |
output_asr_text = gr.Textbox(label="ASR Transcription", interactive=False)
|
| 580 |
output_text = gr.Textbox(label="LLM Response", interactive=False)
|