antonbol commited on
Commit
68971e1
1 Parent(s): 46ec980

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -4,11 +4,13 @@ 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_path = model.download()
9
  model_path_pth = model_path + "/vocal_model.pth"
10
- subprocess.run(["python", "inference.py", "--input", audio, "--pretrained_model", model_path_pth])
11
- return audio
 
12
 
13
  iface = gr.Interface(
14
  fn=vocal_remove,
 
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"
14
 
15
  iface = gr.Interface(
16
  fn=vocal_remove,