Skip to content

Commit

Permalink
[-] importlib-resources is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Oct 11, 2023
1 parent 21c7b38 commit d472899
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
python = "^3.8"
librosa = "^0.10.1"
numpy = ">=1.25.0,<1.26.0"
numba = ">=0.58.0,<0.59.0"
Expand All @@ -20,7 +20,6 @@ tqdm = "^4.66.1"
transformers = "^4.34.0"
pyyaml = "^6.0.1"
scikit-learn = "^1.3.1"
importlib-resources = ">=5.12.0,<5.13.0"


[build-system]
Expand Down
4 changes: 2 additions & 2 deletions src/CLAPWrapper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from pathlib import Path
import warnings
warnings.filterwarnings("ignore")
import random
Expand All @@ -12,7 +13,6 @@
import torchaudio.transforms as T
import os
import torch
from importlib_resources import files
import argparse
import yaml
import sys
Expand Down Expand Up @@ -41,7 +41,7 @@ def __init__(self, model_fp, version, use_cuda=False):

def get_config_path(self, version):
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:
raise ValueError(f"The specific version is not supported. The supported versions are {str(self.supported_versions)}")

Expand Down

0 comments on commit d472899

Please sign in to comment.