Spaces:
Runtime error
Runtime error
RockmanYang
commited on
Commit
·
ac788b3
1
Parent(s):
e4136ce
Update app.py
Browse files
app.py
CHANGED
@@ -2,12 +2,13 @@ import gradio as gr
|
|
2 |
import hopsworks
|
3 |
import subprocess
|
4 |
def vocal_remove(audio):
|
5 |
-
project = hopsworks.login()
|
6 |
-
mr = project.get_model_registry()
|
7 |
# model = mr.get_best_model("vocal_remover", "validation_loss", "min")
|
8 |
-
model = mr.get_model("vocal_remover", version=3)
|
9 |
-
model_path = model.download()
|
10 |
-
model_path_pth = model_path + "/vocal_model.pth"
|
|
|
11 |
# print("model_path: ", model_path)s
|
12 |
subprocess.run(["python3", "inference.py", "--input", audio, "--pretrained_model", model_path_pth, "--output_dir", "./"])
|
13 |
return "./Instruments.wav"
|
|
|
2 |
import hopsworks
|
3 |
import subprocess
|
4 |
def vocal_remove(audio):
|
5 |
+
#project = hopsworks.login()
|
6 |
+
#mr = project.get_model_registry()
|
7 |
# model = mr.get_best_model("vocal_remover", "validation_loss", "min")
|
8 |
+
#model = mr.get_model("vocal_remover", version=3)
|
9 |
+
#model_path = model.download()
|
10 |
+
#model_path_pth = model_path + "/vocal_model.pth"
|
11 |
+
model_path_pth = "./baseline.pth"
|
12 |
# print("model_path: ", model_path)s
|
13 |
subprocess.run(["python3", "inference.py", "--input", audio, "--pretrained_model", model_path_pth, "--output_dir", "./"])
|
14 |
return "./Instruments.wav"
|