-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
can you please update __init__.py
as follows:
# Try to use the new importlib.resources, fall back to pkg_resources
try:
from importlib import resources
def get_resource_filename(package_name, resource_name):
try:
# For Python 3.9+
return str(resources.files(package_name) / resource_name)
except AttributeError:
# For Python 3.7-3.8
with resources.path(package_name, resource_name) as path:
return str(path)
except ImportError:
import warnings
warnings.filterwarnings("ignore", category=UserWarning, message="pkg_resources is deprecated")
from pkg_resources import resource_filename
def get_resource_filename(package_name, resource_name):
return resource_filename(package_name, resource_name)
PREPACKAGED_MODELS_DIR = get_resource_filename(__name__, "pretrained")
from .perth_net_implicit.perth_watermarker import PerthImplicitWatermarker```
Thanks a lot
Metadata
Metadata
Assignees
Labels
No labels