Spaces:
Sleeping
Sleeping
fixing path model state
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ mtcnn = MTCNN(keep_all=True, device='cuda' if torch.cuda.is_available() else 'cp
|
|
11 |
|
12 |
# Load the pre-trained FaceNet model
|
13 |
facenet = InceptionResnetV1(pretrained='vggface2').eval().to('cuda' if torch.cuda.is_available() else 'cpu')
|
14 |
-
model_path = r'
|
15 |
model_state_dict = torch.load(model_path)
|
16 |
facenet.load_state_dict(model_state_dict)
|
17 |
facenet.eval() # Set the model to evaluation mode
|
|
|
11 |
|
12 |
# Load the pre-trained FaceNet model
|
13 |
facenet = InceptionResnetV1(pretrained='vggface2').eval().to('cuda' if torch.cuda.is_available() else 'cpu')
|
14 |
+
model_path = r'faceNet6.pth'
|
15 |
model_state_dict = torch.load(model_path)
|
16 |
facenet.load_state_dict(model_state_dict)
|
17 |
facenet.eval() # Set the model to evaluation mode
|