fix official weights

The model is no longer available from the link
This commit is contained in:
Max Skobeev 2023-10-30 15:56:15 +00:00 committed by huggingface-web
parent 5e6d9e01cf
commit 97cb15e51d

3
app.py
View File

@ -25,8 +25,7 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
# Download official weights
if not os.path.exists("saved_models"):
os.mkdir("saved_models")
MODEL_PATH_URL = "https://drive.google.com/uc?id=1KyMpRjewZdyYfxHPYcd-ZbanIXtin0Sn"
gdown.download(MODEL_PATH_URL, "saved_models/isnet.pth", use_cookies=False)
os.system("mv isnet.pth saved_models/")
class GOSNormalize(object):
'''