Spaces:
Sleeping
Sleeping
hugofloresgarcia
commited on
Commit
·
a9e7471
1
Parent(s):
21f1cf2
fix
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import torch
|
|
6 |
from audiotools import AudioSignal
|
7 |
|
8 |
import gradio as gr
|
9 |
-
from pyharp import ModelCard, build_endpoint
|
10 |
|
11 |
|
12 |
def hpss(signal: AudioSignal, **kwargs):
|
@@ -53,10 +53,7 @@ def process_fn(audio_file,
|
|
53 |
+ percussive.volume_change(clip(percussive_db))
|
54 |
)
|
55 |
|
56 |
-
|
57 |
-
output_dir.mkdir(exist_ok=True)
|
58 |
-
sig.write(output_dir / "output.wav")
|
59 |
-
return sig.path_to_file
|
60 |
|
61 |
# Create a ModelCard
|
62 |
card = ModelCard(
|
|
|
6 |
from audiotools import AudioSignal
|
7 |
|
8 |
import gradio as gr
|
9 |
+
from pyharp import ModelCard, build_endpoint, save_and_return_filepath
|
10 |
|
11 |
|
12 |
def hpss(signal: AudioSignal, **kwargs):
|
|
|
53 |
+ percussive.volume_change(clip(percussive_db))
|
54 |
)
|
55 |
|
56 |
+
return save_and_return_filepath(sig)
|
|
|
|
|
|
|
57 |
|
58 |
# Create a ModelCard
|
59 |
card = ModelCard(
|