Spaces:
kevinwang676
/
Runtime error

gorkemgoknar commited on
Commit
2fb935b
1 Parent(s): 0287131

Update app.py

Browse files

Limit to 200 characters

Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -30,6 +30,12 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree):
30
  None,
31
  None,
32
  )
 
 
 
 
 
 
33
  try:
34
  tts.tts_to_file(
35
  text=prompt,
 
30
  None,
31
  None,
32
  )
33
+ if len(prompt)>200:
34
+ gr.Warning("Text length limited to 200 characters for this demo, please try shorter text")
35
+ return (
36
+ None,
37
+ None,
38
+ )
39
  try:
40
  tts.tts_to_file(
41
  text=prompt,