From 0d2509c13947de99a67739035104fcd2c72940e7 Mon Sep 17 00:00:00 2001 From: Yurii Paniv Date: Fri, 20 Oct 2023 00:57:31 +0300 Subject: [PATCH] Temp fix for concurrency --- app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 32c921f..b36e04b 100644 --- a/app.py +++ b/app.py @@ -48,9 +48,10 @@ class VoiceOption(Enum): print(f"CUDA available? {is_available()}") +ukr_tts = TTS(device="cuda" if is_available() else "cpu") + def tts(text: str, voice: str): - ukr_tts = TTS(device="cuda" if is_available() else "cpu") # TODO: fix print("============================") print("Original text:", text) print("Voice", voice) @@ -128,5 +129,5 @@ def tts(text: str, voice: str): ], ], ) -iface.queue(concurrency_count=3) # for HF specifically +iface.queue(concurrency_count=1) # for HF specifically iface.launch()