nikkmitra commited on
Commit
d54243a
·
verified ·
1 Parent(s): 822d577

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -73,6 +73,7 @@ def split_text_into_chunks(text, max_tokens=100, language="en"):
73
  chunks.append(chunk)
74
  return '\n'.join(chunks)
75
 
 
76
  def tts_generate(text, voice, language):
77
  # Check for Hindi language and split text if necessary
78
 
@@ -164,4 +165,4 @@ demo.launch()
164
  # Clean up temporary files (this will run after the Gradio server is closed)
165
  for file in os.listdir():
166
  if file.endswith('.wav') and file.startswith('tmp'):
167
- os.remove(file)
 
73
  chunks.append(chunk)
74
  return '\n'.join(chunks)
75
 
76
+ @spaces.GPU(duration=120)
77
  def tts_generate(text, voice, language):
78
  # Check for Hindi language and split text if necessary
79
 
 
165
  # Clean up temporary files (this will run after the Gradio server is closed)
166
  for file in os.listdir():
167
  if file.endswith('.wav') and file.startswith('tmp'):
168
+ os.remove(file)