kingabzpro commited on
Commit
5cd7273
·
verified ·
1 Parent(s): 2bccd97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -6
app.py CHANGED
@@ -279,10 +279,28 @@ def transcribe_audio(
279
  theme = gr.themes.Soft(primary_hue="rose", secondary_hue="violet", neutral_hue="slate")
280
 
281
  with gr.Blocks(
282
- title="Faster Urdu ASR + LLM Polisher",
283
  theme=theme,
284
  ) as iface:
285
- gr.Markdown("### **Faster Urdu ASR + LLM Polisher** \nHigh-quality Urdu transcription via Faster-Whisper, with optional Groq LLM polishing.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
 
287
  with gr.Row():
288
  # LEFT: Audio + Settings + Actions
@@ -291,7 +309,6 @@ with gr.Blocks(
291
  sources=["upload", "microphone"],
292
  type="filepath",
293
  label="Upload or Record Audio",
294
- # Hide extra transport UI to avoid “double play” feeling
295
  waveform_options={"show_controls": False},
296
  autoplay=False,
297
  streaming=False,
@@ -331,13 +348,14 @@ with gr.Blocks(
331
  with gr.Row():
332
  btn = gr.Button("Transcribe", variant="primary")
333
 
334
- # RIGHT: Output
335
  with gr.Column(scale=7):
336
  out = gr.Textbox(
337
  label="Result",
338
- lines=26,
339
- max_lines=40,
340
  show_copy_button=True,
 
341
  )
342
 
343
  # Wiring
 
279
  theme = gr.themes.Soft(primary_hue="rose", secondary_hue="violet", neutral_hue="slate")
280
 
281
  with gr.Blocks(
282
+ title="Urdu ASR Studio — Faster-Whisper + LLM Polishing",
283
  theme=theme,
284
  ) as iface:
285
+ # Title + description
286
+ gr.Markdown(
287
+ """# **Urdu ASR Studio**
288
+ High-quality Urdu transcription with Faster-Whisper (CT2), plus optional Groq LLM polishing for cleaner grammar and punctuation."""
289
+ )
290
+
291
+ # Small CSS to keep the output panel visually balanced (scrolls when long)
292
+ gr.HTML(
293
+ """
294
+ <style>
295
+ /* shrink the textbox height and keep it neat */
296
+ #result_box textarea {
297
+ min-height: 280px !important;
298
+ max-height: 420px !important;
299
+ overflow-y: auto !important;
300
+ }
301
+ </style>
302
+ """
303
+ )
304
 
305
  with gr.Row():
306
  # LEFT: Audio + Settings + Actions
 
309
  sources=["upload", "microphone"],
310
  type="filepath",
311
  label="Upload or Record Audio",
 
312
  waveform_options={"show_controls": False},
313
  autoplay=False,
314
  streaming=False,
 
348
  with gr.Row():
349
  btn = gr.Button("Transcribe", variant="primary")
350
 
351
+ # RIGHT: Output (shorter, balanced height)
352
  with gr.Column(scale=7):
353
  out = gr.Textbox(
354
  label="Result",
355
+ lines=14, # ↓ shorter default height
356
+ max_lines=30,
357
  show_copy_button=True,
358
+ elem_id="result_box" # for CSS above
359
  )
360
 
361
  # Wiring