fireredteam commited on
Commit
7b98f12
1 Parent(s): 9c31cdf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -2,6 +2,8 @@ import gradio as gr
2
  import numpy as np
3
  import os
4
  import requests
 
 
5
  from fireredtts.fireredtts import FireRedTTS
6
 
7
 
@@ -31,6 +33,7 @@ tts = FireRedTTS(
31
  pretrained_path='pretrained_models',
32
  )
33
 
 
34
  def tts_inference(text, prompt_wav='examples/prompt_1.wav', lang='zh'):
35
  # Model inference
36
  syn_audio = tts.synthesize(
 
2
  import numpy as np
3
  import os
4
  import requests
5
+ import spaces
6
+
7
  from fireredtts.fireredtts import FireRedTTS
8
 
9
 
 
33
  pretrained_path='pretrained_models',
34
  )
35
 
36
+ @spaces.GPU
37
  def tts_inference(text, prompt_wav='examples/prompt_1.wav', lang='zh'):
38
  # Model inference
39
  syn_audio = tts.synthesize(