adityachhabra commited on
Commit
e2df07e
·
1 Parent(s): ac3f875

Update temperature and advanced settings

Browse files
Files changed (1) hide show
  1. app.py +17 -13
app.py CHANGED
@@ -232,32 +232,36 @@ with gr.Blocks(title="Svara Multilingual TTS", theme=custom_theme, css=".note{op
232
 
233
  with gr.Accordion("Advanced Settings", open=False):
234
  temperature = gr.Slider(
235
- minimum=0.5,
236
- maximum=0.9,
237
- value=0.6,
238
  step=0.1,
239
- label="Temperature"
 
240
  )
241
  top_p = gr.Slider(
242
- minimum=0.6,
243
  maximum=1.0,
244
- value=0.9,
245
  step=0.1,
246
- label="Top-p (nucleus sampling)"
 
247
  )
248
  repetition_penalty = gr.Slider(
249
  minimum=1.0,
250
  maximum=1.5,
251
- value=1.2,
252
- step=0.1,
253
- label="Repetition Penalty"
 
254
  )
255
  max_new_tokens = gr.Slider(
256
  minimum=100,
257
  maximum=2000,
258
- value=900,
259
  step=50,
260
- label="Max New Tokens"
 
261
  )
262
 
263
  with gr.Column(scale=2):
@@ -282,7 +286,7 @@ with gr.Blocks(title="Svara Multilingual TTS", theme=custom_theme, css=".note{op
282
 
283
  def _clear():
284
  # Reset text, audio, and sliders to defaults
285
- return (None, None, 0.6, 0.9, 1.2, 900)
286
 
287
  clear.click(
288
  _clear,
 
232
 
233
  with gr.Accordion("Advanced Settings", open=False):
234
  temperature = gr.Slider(
235
+ minimum=0.3,
236
+ maximum=1.2,
237
+ value=0.7,
238
  step=0.1,
239
+ label="Temperature",
240
+ info="Higher = more expressive prosody; 0.6-0.9 for conversational, 0.9-1.2 for dramatic"
241
  )
242
  top_p = gr.Slider(
243
+ minimum=0.2,
244
  maximum=1.0,
245
+ value=0.8,
246
  step=0.1,
247
+ label="Top-p (nucleus sampling)",
248
+ info="0.6-0.8 for natural prosody, 0.8-1.0 for expressive/dramatic"
249
  )
250
  repetition_penalty = gr.Slider(
251
  minimum=1.0,
252
  maximum=1.5,
253
+ value=1.1,
254
+ step=0.05,
255
+ label="Repetition Penalty",
256
+ info="≥1.1 recommended for stable generation; prevents loops"
257
  )
258
  max_new_tokens = gr.Slider(
259
  minimum=100,
260
  maximum=2000,
261
+ value=1200,
262
  step=50,
263
+ label="Max New Tokens",
264
+ info="Typical range: 900-1200 for most sentences"
265
  )
266
 
267
  with gr.Column(scale=2):
 
286
 
287
  def _clear():
288
  # Reset text, audio, and sliders to defaults
289
+ return (None, None, 0.7, 0.8, 1.1, 1200)
290
 
291
  clear.click(
292
  _clear,