Skip to content

Commit

Permalink
Changing FIleNotFoundError to ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmednasserswe committed Jan 29, 2024
1 parent 80ae3fd commit a012808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model/image_sscd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self):
#FIXME: Load from a Meedan S3 bucket
try:
self.model = torch.jit.load("sscd_disc_mixup.torchscript.pt")
except FileNotFoundError:
except ValueError:
logger.info("Downloading SSCD model...")
m=urllib.request.urlopen("https://dl.fbaipublicfiles.com/sscd-copy-detection/sscd_disc_mixup.torchscript.pt").read()
with open("sscd_disc_mixup.torchscript.pt","wb") as fh:
Expand Down

0 comments on commit a012808

Please sign in to comment.