[-] importlib-resources is not needed
This commit is contained in:
+1
-2
@@ -7,7 +7,7 @@ license = "MIT"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.9"
|
python = "^3.8"
|
||||||
librosa = "^0.10.1"
|
librosa = "^0.10.1"
|
||||||
numpy = ">=1.25.0,<1.26.0"
|
numpy = ">=1.25.0,<1.26.0"
|
||||||
numba = ">=0.58.0,<0.59.0"
|
numba = ">=0.58.0,<0.59.0"
|
||||||
@@ -20,7 +20,6 @@ tqdm = "^4.66.1"
|
|||||||
transformers = "^4.34.0"
|
transformers = "^4.34.0"
|
||||||
pyyaml = "^6.0.1"
|
pyyaml = "^6.0.1"
|
||||||
scikit-learn = "^1.3.1"
|
scikit-learn = "^1.3.1"
|
||||||
importlib-resources = ">=5.12.0,<5.13.0"
|
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,4 @@
|
|||||||
|
from pathlib import Path
|
||||||
import warnings
|
import warnings
|
||||||
warnings.filterwarnings("ignore")
|
warnings.filterwarnings("ignore")
|
||||||
import random
|
import random
|
||||||
@@ -12,7 +13,6 @@ import math
|
|||||||
import torchaudio.transforms as T
|
import torchaudio.transforms as T
|
||||||
import os
|
import os
|
||||||
import torch
|
import torch
|
||||||
from importlib_resources import files
|
|
||||||
import argparse
|
import argparse
|
||||||
import yaml
|
import yaml
|
||||||
import sys
|
import sys
|
||||||
@@ -41,7 +41,7 @@ class CLAPWrapper():
|
|||||||
|
|
||||||
def get_config_path(self, version):
|
def get_config_path(self, version):
|
||||||
if version in self.supported_versions:
|
if version in self.supported_versions:
|
||||||
return files('configs').joinpath(f"config_{version}.yml").read_text()
|
return (Path(__file__).parent / f"configs/config_{version}.yml").read_text()
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"The specific version is not supported. The supported versions are {str(self.supported_versions)}")
|
raise ValueError(f"The specific version is not supported. The supported versions are {str(self.supported_versions)}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user