Use single-column layout in web UI with status below submit button
This commit is contained in:
+34
-35
@@ -134,47 +134,46 @@ def create_app():
|
|||||||
if header_html:
|
if header_html:
|
||||||
gr.HTML(header_html)
|
gr.HTML(header_html)
|
||||||
|
|
||||||
with gr.Row(elem_id="main-row"):
|
# Single-column layout: inputs followed by status/output
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
audio_input = gr.Audio(
|
audio_input = gr.Audio(
|
||||||
label="Upload or record audio",
|
label="Upload or record audio",
|
||||||
type="filepath",
|
type="filepath",
|
||||||
)
|
)
|
||||||
|
|
||||||
task_choice = gr.Radio(
|
task_choice = gr.Radio(
|
||||||
choices=[
|
choices=[
|
||||||
("Transcribe", "transcribe"),
|
("Transcribe", "transcribe"),
|
||||||
("Transcribe & summarize", "transcript_and_summarize"),
|
("Transcribe & summarize", "transcript_and_summarize"),
|
||||||
],
|
],
|
||||||
value="transcribe",
|
value="transcribe",
|
||||||
label="Task",
|
label="Task",
|
||||||
container=True,
|
container=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
identify_speakers = gr.Checkbox(
|
identify_speakers = gr.Checkbox(
|
||||||
label="Identify speakers (best effort using AI)",
|
label="Identify speakers (best effort using AI)",
|
||||||
value=True,
|
value=True,
|
||||||
info="If enabled, AI will attempt to infer real names for speakers and replace Speaker 1/2/etc. in the transcript.",
|
info="If enabled, AI will attempt to infer real names for speakers and replace Speaker 1/2/etc. in the transcript.",
|
||||||
)
|
)
|
||||||
|
|
||||||
email_to = gr.Textbox(
|
email_to = gr.Textbox(
|
||||||
label="Your email address (required)",
|
label="Your email address (required)",
|
||||||
placeholder="e.g. your.name@example.com",
|
placeholder="e.g. your.name@example.com",
|
||||||
)
|
)
|
||||||
|
|
||||||
email_cc = gr.Textbox(
|
email_cc = gr.Textbox(
|
||||||
label="CC (optional, comma-separated)",
|
label="CC (optional, comma-separated)",
|
||||||
placeholder="e.g. manager@example.com",
|
placeholder="e.g. manager@example.com",
|
||||||
)
|
)
|
||||||
|
|
||||||
submit_btn = gr.Button("Submit for transcription", variant="primary")
|
submit_btn = gr.Button("Submit for transcription", variant="primary")
|
||||||
|
|
||||||
with gr.Column():
|
status_text = gr.Textbox(
|
||||||
status_text = gr.Textbox(
|
label="Status",
|
||||||
label="Status",
|
lines=6,
|
||||||
lines=6,
|
interactive=False,
|
||||||
interactive=False,
|
)
|
||||||
)
|
|
||||||
|
|
||||||
# Footer
|
# Footer
|
||||||
if footer_html:
|
if footer_html:
|
||||||
|
|||||||
Reference in New Issue
Block a user