Skip to content

Commit

Permalink
Temp fix for concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
robinhad committed Oct 19, 2023
1 parent 6119fad commit 0d2509c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()

0 comments on commit 0d2509c

Please sign in to comment.