Skip to content

Commit

Permalink
Fixing deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
matsen committed Nov 13, 2024
1 parent b33fe6a commit 4f9d632
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions netam/pretrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@

import os
import zipfile
import pkg_resources
from importlib.resources import files

import requests

from netam.framework import load_crepe

# This throws a deprecation warning. It could also be done by looking at
# __file__, or by using importlib.resources.
PRETRAINED_DIR = pkg_resources.resource_filename(__name__, "_pretrained")
with files(__package__).joinpath("_pretrained") as pretrained_path:
PRETRAINED_DIR = str(pretrained_path)

PACKAGE_LOCATIONS_AND_CONTENTS = (
# Order of entries:
Expand Down

0 comments on commit 4f9d632

Please sign in to comment.