Spaces:
Running
Running
sebastiansarasti
commited on
Commit
•
a50b87e
1
Parent(s):
b8c7cfd
solving file path
Browse files
search.py
CHANGED
@@ -28,7 +28,7 @@ filename = "best_model.pth"
|
|
28 |
|
29 |
file_path = hf_hub_download(repo_id=model_name, filename=filename)
|
30 |
|
31 |
-
clip_model.load_state_dict(torch.load(
|
32 |
|
33 |
te_final = clip_model.text_encoder
|
34 |
ie_final = clip_model.image_encoder
|
|
|
28 |
|
29 |
file_path = hf_hub_download(repo_id=model_name, filename=filename)
|
30 |
|
31 |
+
clip_model.load_state_dict(torch.load(file_path, map_location=torch.device('cpu')))
|
32 |
|
33 |
te_final = clip_model.text_encoder
|
34 |
ie_final = clip_model.image_encoder
|