semakoc commited on
Commit
1081643
·
verified ·
1 Parent(s): 0386c27

layout changes

Browse files
Files changed (1) hide show
  1. app.py +22 -11
app.py CHANGED
@@ -117,30 +117,41 @@ def toggle_language(switch):
117
  "Download ZIP File"
118
  )
119
 
 
120
  # Interface
121
  with gr.Blocks() as demo:
122
  lang_switch = gr.Checkbox(label="切換到繁體中文 (Switch to Traditional Chinese)")
123
 
124
  title = gr.Markdown("Amis ASR Transcription & Correction System")
125
  step1 = gr.Markdown("Step 1: Audio Upload & Transcription")
126
- step2 = gr.Markdown("Step 2: Review & Edit Transcription")
127
- step3 = gr.Markdown("Step 3: User Information")
128
- step4 = gr.Markdown("Step 4: Save & Download")
129
-
130
  with gr.Row():
131
  audio_input = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Audio Input")
 
 
 
132
  transcribe_button = gr.Button("Transcribe Audio")
133
 
134
  original_text = gr.Textbox(label="Original Transcription", interactive=False, lines=5)
135
  corrected_text = gr.Textbox(label="Corrected Transcription", interactive=True, lines=5)
136
 
137
- age_input = gr.Slider(minimum=0, maximum=100, step=1, label="Age", value=25)
138
- native_speaker_input = gr.Checkbox(label="Native Amis Speaker?", value=True)
 
 
 
 
139
 
140
- save_button = gr.Button("Save Correction")
141
- save_status = gr.Textbox(label="Save Status", interactive=False)
142
- download_button = gr.Button("Download ZIP File")
143
- download_output = gr.File()
 
 
 
 
 
144
 
145
  # Toggle language dynamically
146
  lang_switch.change(
@@ -169,4 +180,4 @@ with gr.Blocks() as demo:
169
  outputs=download_output
170
  )
171
 
172
- demo.launch()
 
117
  "Download ZIP File"
118
  )
119
 
120
+ # Interface
121
  # Interface
122
  with gr.Blocks() as demo:
123
  lang_switch = gr.Checkbox(label="切換到繁體中文 (Switch to Traditional Chinese)")
124
 
125
  title = gr.Markdown("Amis ASR Transcription & Correction System")
126
  step1 = gr.Markdown("Step 1: Audio Upload & Transcription")
127
+
128
+ # Audio input and playback (Original section)
 
 
129
  with gr.Row():
130
  audio_input = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Audio Input")
131
+
132
+ # Transcribe button below the audio input (Added this section to place the button below the playback)
133
+ with gr.Row(): # Added this Row to position the button below the audio input
134
  transcribe_button = gr.Button("Transcribe Audio")
135
 
136
  original_text = gr.Textbox(label="Original Transcription", interactive=False, lines=5)
137
  corrected_text = gr.Textbox(label="Corrected Transcription", interactive=True, lines=5)
138
 
139
+ step2 = gr.Markdown("Step 2: Review & Edit Transcription")
140
+ step3 = gr.Markdown("Step 3: User Information")
141
+
142
+ with gr.Row():
143
+ age_input = gr.Slider(minimum=0, maximum=100, step=1, label="Age", value=25)
144
+ native_speaker_input = gr.Checkbox(label="Native Amis Speaker?", value=True)
145
 
146
+ step4 = gr.Markdown("Step 4: Save & Download")
147
+
148
+ with gr.Row():
149
+ save_button = gr.Button("Save Correction")
150
+ save_status = gr.Textbox(label="Save Status", interactive=False)
151
+
152
+ with gr.Row():
153
+ download_button = gr.Button("Download ZIP File")
154
+ download_output = gr.File()
155
 
156
  # Toggle language dynamically
157
  lang_switch.change(
 
180
  outputs=download_output
181
  )
182
 
183
+ demo.launch()