Update app.py
Browse files
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 >
|
21 |
-
time.sleep(
|
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}")
|