Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'''
model = Detector()
'''
url = 'https://github.com/bedapudi6788/NudeNet/releases/download/v0/detector_model'
home = os.path.expanduser("~")
model_folder = os.path.join(home, '.NudeNet/')
if not os.path.exists(model_folder):
os.mkdir(model_folder)
model_path = os.path.join(model_folder, 'detector')
if not os.path.exists(model_path):
print('Downloading the checkpoint to', model_path)
pydload.dload(url, save_to_path=model_path, max_time=None)
Detector.detection_model = models.load_model(model_path, backbone_name='resnet101')