2cylu2 commited on
Commit
fb8c44c
·
verified ·
1 Parent(s): ad1ec43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -10,7 +10,7 @@ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
10
  model_card = ModelCard(
11
  name="S-KEY Detection",
12
  description="Musical key detection using Self-supervised Key Detection.",
13
- author="Deezer Research",
14
  tags=["key detection", "mir"],
15
  )
16
 
@@ -18,7 +18,12 @@ model_card = ModelCard(
18
  def process_fn(input_audio_path):
19
  try:
20
  ext = input_audio_path.split(".")[-1].lower()
21
- detected_key = detect_key(input_audio_path, ext, DEVICE)
 
 
 
 
 
22
 
23
  if isinstance(detected_key, list):
24
  detected_key = detected_key[0]
 
10
  model_card = ModelCard(
11
  name="S-KEY Detection",
12
  description="Musical key detection using Self-supervised Key Detection.",
13
+ author="Yuexuan Kong et al.",
14
  tags=["key detection", "mir"],
15
  )
16
 
 
18
  def process_fn(input_audio_path):
19
  try:
20
  ext = input_audio_path.split(".")[-1].lower()
21
+
22
+ detected_key = detect_key(
23
+ audio_dir=input_audio_path,
24
+ extension=ext,
25
+ device=DEVICE
26
+ )
27
 
28
  if isinstance(detected_key, list):
29
  detected_key = detected_key[0]