viewfinder-annn commited on
Commit
2605365
·
verified ·
1 Parent(s): 8f9d8e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,6 +9,7 @@ import soundfile as sf
9
  import gradio as gr
10
  import time
11
  from huggingface_hub import snapshot_download
 
12
 
13
  repo_id = "amphion/anyaccomp"
14
  base_dir = os.path.dirname(os.path.abspath(__file__))
@@ -48,7 +49,7 @@ except Exception as e:
48
  print(f"Error loading model: {e}")
49
  inference_pipeline = None
50
 
51
-
52
  def sing2song_inference(vocal_filepath, n_timesteps, cfg_scale, seed):
53
  if inference_pipeline is None:
54
  raise gr.Error(
 
9
  import gradio as gr
10
  import time
11
  from huggingface_hub import snapshot_download
12
+ import spaces # added
13
 
14
  repo_id = "amphion/anyaccomp"
15
  base_dir = os.path.dirname(os.path.abspath(__file__))
 
49
  print(f"Error loading model: {e}")
50
  inference_pipeline = None
51
 
52
+ @spaces.GPU # added
53
  def sing2song_inference(vocal_filepath, n_timesteps, cfg_scale, seed):
54
  if inference_pipeline is None:
55
  raise gr.Error(