utkarshshukla2912 commited on
Commit
9baf492
·
1 Parent(s): 3a25d8c

reduced text size

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -234,11 +234,11 @@ with gr.Blocks(
234
  with gr.Group():
235
  # Text Input
236
  text_input = gr.Textbox(
237
- label="Text (max 350 characters)",
238
- placeholder="Type or paste your text here (max 350 characters)...",
239
  lines=6,
240
  max_lines=10,
241
- max_length=350,
242
  )
243
  # Voice Selection
244
  voices = get_voices()
@@ -253,7 +253,7 @@ with gr.Blocks(
253
  )
254
  # Character count display
255
  char_count = gr.Code(
256
- "Character count: 0 / 350",
257
  show_line_numbers=False,
258
  show_label=False,
259
  )
@@ -303,16 +303,16 @@ with gr.Blocks(
303
  def update_char_count(text):
304
  """Update character count as user types"""
305
  count = len(text) if text else 0
306
- return f"Character count: {count} / 350"
307
 
308
  def load_example_text(example_text):
309
  """Load example text and update character count"""
310
  count = len(example_text)
311
- return example_text, f"Character count: {count} / 350"
312
 
313
  def clear_text():
314
  """Clear text input"""
315
- return "", "Character count: 0 / 350"
316
 
317
  def on_generate(text, voice_display):
318
  """Generate speech using both base and distill models in parallel."""
 
234
  with gr.Group():
235
  # Text Input
236
  text_input = gr.Textbox(
237
+ label="Text (max 300 characters)",
238
+ placeholder="Type or paste your text here (max 300 characters)...",
239
  lines=6,
240
  max_lines=10,
241
+ max_length=300,
242
  )
243
  # Voice Selection
244
  voices = get_voices()
 
253
  )
254
  # Character count display
255
  char_count = gr.Code(
256
+ "Character count: 0 / 300",
257
  show_line_numbers=False,
258
  show_label=False,
259
  )
 
303
  def update_char_count(text):
304
  """Update character count as user types"""
305
  count = len(text) if text else 0
306
+ return f"Character count: {count} / 300"
307
 
308
  def load_example_text(example_text):
309
  """Load example text and update character count"""
310
  count = len(example_text)
311
+ return example_text, f"Character count: {count} / 300"
312
 
313
  def clear_text():
314
  """Clear text input"""
315
+ return "", "Character count: 0 / 300"
316
 
317
  def on_generate(text, voice_display):
318
  """Generate speech using both base and distill models in parallel."""