mrrtmob commited on
Commit
1f2a815
·
1 Parent(s): fb01dbf

Update generate_speech function to accept max_new_tokens as a parameter and adjust default slider value to 1200

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -171,7 +171,7 @@ def update_char_count(text):
171
  # Main generation function with rate limiting
172
  @rate_limit
173
  @spaces.GPU(duration=45)
174
- def generate_speech(text, temperature=0.6, top_p=0.95, repetition_penalty=1.1, max_new_tokens, voice="Elise", progress=gr.Progress()):
175
  if not text.strip():
176
  gr.Warning("Please enter some text to generate speech.")
177
  return None
 
171
  # Main generation function with rate limiting
172
  @rate_limit
173
  @spaces.GPU(duration=45)
174
+ def generate_speech(text, temperature=0.6, top_p=0.95, repetition_penalty=1.1, max_new_tokens=1200, voice="Elise", progress=gr.Progress()):
175
  if not text.strip():
176
  gr.Warning("Please enter some text to generate speech.")
177
  return None