Spaces:
Sleeping
Sleeping
Sudipta Nayak
commited on
Commit
·
3aabb36
1
Parent(s):
8eec1bc
path changes
Browse files
app/Hackathon_setup/face_recognition.py
CHANGED
@@ -87,7 +87,8 @@ def get_similarity(img1, img2):
|
|
87 |
# YOUR CODE HERE, load the model
|
88 |
feature_net = SiameseNetwork() #Example Network
|
89 |
feature_net = feature_net.to(device)
|
90 |
-
|
|
|
91 |
feature_net.load_state_dict(model['net_dict'])
|
92 |
|
93 |
# YOUR CODE HERE, return similarity measure using your model
|
|
|
87 |
# YOUR CODE HERE, load the model
|
88 |
feature_net = SiameseNetwork() #Example Network
|
89 |
feature_net = feature_net.to(device)
|
90 |
+
current_path = 'app/Hackathon_setup'
|
91 |
+
model = torch.load(current_path + '/siamese_model.t7', map_location=device)
|
92 |
feature_net.load_state_dict(model['net_dict'])
|
93 |
|
94 |
# YOUR CODE HERE, return similarity measure using your model
|