Hugo Flores Garcia commited on
Commit
b566033
1 Parent(s): 5132796
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -9,6 +9,7 @@ from dataclasses import dataclass, asdict
9
  import numpy as np
10
  import audiotools as at
11
  import argbind
 
12
 
13
  import gradio as gr
14
  from vampnet.interface import Interface
@@ -17,10 +18,15 @@ from vampnet import mask as pmask
17
  Interface = argbind.bind(Interface)
18
  # AudioLoader = argbind.bind(at.data.datasets.AudioLoader)
19
 
20
- conf = argbind.parse_args()
 
 
21
 
22
  with argbind.scope(conf):
23
- interface = Interface()
 
 
 
24
  # loader = AudioLoader()
25
  print(f"interface device is {interface.device}")
26
 
 
9
  import numpy as np
10
  import audiotools as at
11
  import argbind
12
+ import torch
13
 
14
  import gradio as gr
15
  from vampnet.interface import Interface
 
18
  Interface = argbind.bind(Interface)
19
  # AudioLoader = argbind.bind(at.data.datasets.AudioLoader)
20
 
21
+ with open("conf/interface.yml") as f:
22
+ conf = yaml.safe_load(f)
23
+
24
 
25
  with argbind.scope(conf):
26
+ interface = Interface(
27
+ device="cuda" if torch.cuda.is_available() else "cpu",
28
+ )
29
+
30
  # loader = AudioLoader()
31
  print(f"interface device is {interface.device}")
32