Spaces:
Runtime error
Runtime error
fixed path
Browse filesFiles changed (3)
13 unmodified lines1415161718192013 unmodified linesdef colorize_image(image):# Load the model# file_path = 'ImageColorizationModel10.pth'file_path = r'model\model_final.pth'model_2 = inf.load_model(model_class=MainModel, file_path=file_path)output_img = inf.predict_color(model_2, image=image)return output_img13 unmodified lines1415161718192013 unmodified linesdef colorize_image(image):# Load the model# file_path = 'ImageColorizationModel10.pth'file_path = './model/model_final.pth'model_2 = inf.load_model(model_class=MainModel, file_path=file_path)output_img = inf.predict_color(model_2, image=image)return output_img
97 unmodified lines989910010110210310497 unmodified linesmodel.load_state_dict(torch.load(file_path, map_location=device))resnet_weights = torch.load(file_path)resnet_weights = torch.load(r"model\res18-unet.pt")resnet_state_dict = resnet_weights['state_dict'] if 'state_dict' in resnet_weights else resnet_weightsmodel_dict = model.state_dict()97 unmodified lines989910010110210310497 unmodified linesmodel.load_state_dict(torch.load(file_path, map_location=device))resnet_weights = torch.load(file_path)resnet_weights = torch.load("./model/res18-unet.pt")resnet_state_dict = resnet_weights['state_dict'] if 'state_dict' in resnet_weights else resnet_weightsmodel_dict = model.state_dict()
__pycache__/inference.cpython-312.pyc
app.py+1-1
inference.py+1-1