doevent commited on
Commit
972f7a1
·
1 Parent(s): 2f9a388

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -17,11 +17,12 @@ def audio_tts(txt, language, audio_file):
17
  global count
18
  count += 1
19
  print(f"Count: {count}")
20
- if count > 100:
21
- time.sleep(5)
22
  os.system("rm -R /tmp/*")
23
  print(f"Reset count: {count}")
24
  count = 0
 
25
 
26
  # TTS with on the fly voice conversion
27
  print(f"Language: {language}")
 
17
  global count
18
  count += 1
19
  print(f"Count: {count}")
20
+ if count > 150:
21
+ time.sleep(30)
22
  os.system("rm -R /tmp/*")
23
  print(f"Reset count: {count}")
24
  count = 0
25
+ gr.Error("Reset counter")
26
 
27
  # TTS with on the fly voice conversion
28
  print(f"Language: {language}")