Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
538 B
2
Indexable
from pathlib import Path

home_directory = Path.home()
print( f'Path: { home_directory} !' )

if not os.path.exists(os.path.join(home_directory,".cache/torch/hub/checkpoints/resnet18-f37072fd.pth")):
    if not os.path.exists(os.path.join(home_directory,".cache/torch/hub/checkpoints")):
        os.makedirs(os.path.join(home_directory,".cache/torch/hub/checkpoints"))
    shutil.copyfile("/usr/src/app/code/torch_models/resnet18-f37072fd.pth",os.path.join(home_directory,".cache/torch/hub/checkpoints/resnet18-f37072fd.pth"))