Update README.md
Browse files
README.md
CHANGED
|
@@ -17,12 +17,8 @@ from huggingface_hub import hf_hub_download
|
|
| 17 |
p = hf_hub_download(
|
| 18 |
repo_id="jeanq1/experiment_pel",
|
| 19 |
filename="model.ckpt",
|
| 20 |
-
local_dir="./weights"
|
| 21 |
-
local_dir_use_symlinks=False # set to True to keep a symlink instead of a copy
|
| 22 |
)
|
| 23 |
|
| 24 |
# Load like any local PyTorch file
|
| 25 |
ckpt = torch.load(p, map_location="cpu", weights_only=False)
|
| 26 |
-
# Example:
|
| 27 |
-
# model = YourModelClass(...)
|
| 28 |
-
# model.load_state_dict(ckpt["state_dict"] if "state_dict" in ckpt else ckpt)
|
|
|
|
| 17 |
p = hf_hub_download(
|
| 18 |
repo_id="jeanq1/experiment_pel",
|
| 19 |
filename="model.ckpt",
|
| 20 |
+
local_dir="./weights"
|
|
|
|
| 21 |
)
|
| 22 |
|
| 23 |
# Load like any local PyTorch file
|
| 24 |
ckpt = torch.load(p, map_location="cpu", weights_only=False)
|
|
|
|
|
|
|
|
|