harp-dev commited on
Commit
dc23dae
·
verified ·
1 Parent(s): 2ccec6b

Make the hardware a settings change, not a code change

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -11,6 +11,7 @@ import torch
11
  from pyharp import ModelCard, build_endpoint, SampleRate, Channels
12
  from pyharp.tags import Subcategory
13
  from df import enhance, init_df
 
14
 
15
  # -----------------------------
16
  # Model metadata for HARP
@@ -88,6 +89,7 @@ def apply_attenuation_db(noisy: np.ndarray, enhanced: np.ndarray, noise_atten_db
88
 
89
 
90
  @torch.inference_mode()
 
91
  def process_fn(input_audio_path: str, noise_atten_db: float) -> str:
92
  if not input_audio_path:
93
  raise ValueError("No input audio provided.")
 
11
  from pyharp import ModelCard, build_endpoint, SampleRate, Channels
12
  from pyharp.tags import Subcategory
13
  from df import enhance, init_df
14
+ import spaces
15
 
16
  # -----------------------------
17
  # Model metadata for HARP
 
89
 
90
 
91
  @torch.inference_mode()
92
+ @spaces.GPU(duration=120)
93
  def process_fn(input_audio_path: str, noise_atten_db: float) -> str:
94
  if not input_audio_path:
95
  raise ValueError("No input audio provided.")