ekwek commited on
Commit
6137274
·
verified ·
1 Parent(s): 686ca9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -5,6 +5,7 @@ from soprano import SopranoTTS
5
  from scipy.io.wavfile import write as wav_write
6
  import tempfile
7
  import os
 
8
 
9
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
10
  print(DEVICE)
@@ -20,6 +21,7 @@ model = SopranoTTS(
20
  SAMPLE_RATE = 32000
21
 
22
 
 
23
  def tts_stream(text, temperature, top_p, repetition_penalty, state):
24
  if not text.strip():
25
  yield None, state
 
5
  from scipy.io.wavfile import write as wav_write
6
  import tempfile
7
  import os
8
+ import spaces
9
 
10
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
11
  print(DEVICE)
 
21
  SAMPLE_RATE = 32000
22
 
23
 
24
+ @spaces.GPU
25
  def tts_stream(text, temperature, top_p, repetition_penalty, state):
26
  if not text.strip():
27
  yield None, state