Skip to content

Commit

Permalink
updated dependencies to resolve pillow safety issue and allow for mor…
Browse files Browse the repository at this point in the history
…e lenient requirements. Additionally, resolved small model download bug.
  • Loading branch information
DavidFromPandora committed Jun 8, 2022
1 parent ffa3afa commit b3e2e8b
Show file tree
Hide file tree
Showing 4 changed files with 2,364 additions and 704 deletions.
5 changes: 4 additions & 1 deletion crosslingual_coreference/CrossLingualPredictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def download_model(self):
"""
It downloads the model from the url provided and saves it in the current directory
"""
self.filename = self.model_url.replace("https://storage.googleapis.com/pandora-intelligence/", "")
if "https://storage.googleapis.com/pandora-intelligence/" in self.model_url:
self.filename = self.model_url.replace("https://storage.googleapis.com/pandora-intelligence/", "")
else:
self.filename = self.model_url.replace("https://storage.googleapis.com/allennlp-public-models/", "")
path = pathlib.Path(self.filename)
if path.is_file():
pass
Expand Down
4 changes: 4 additions & 0 deletions crosslingual_coreference/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

import nltk

nltk.download("omw-1.4")
Expand All @@ -10,6 +12,8 @@
CrossLingualPredictorSpacy as SpacyPredictor,
)

warnings.filterwarnings("ignore", category=UserWarning)
warnings.filterwarnings("ignore", category=DeprecationWarning)
__all__ = ["Predictor"]


Expand Down
Loading

0 comments on commit b3e2e8b

Please sign in to comment.