From 8dc4bc932a33c0a9c755f23161d3d33b217f58e8 Mon Sep 17 00:00:00 2001 From: afallah Date: Mon, 17 Feb 2025 17:37:48 -0500 Subject: [PATCH] Add readme for downloading model weights. --- openpmcvl/granular/checkpoints/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 openpmcvl/granular/checkpoints/README.md diff --git a/openpmcvl/granular/checkpoints/README.md b/openpmcvl/granular/checkpoints/README.md new file mode 100644 index 0000000..a9c594b --- /dev/null +++ b/openpmcvl/granular/checkpoints/README.md @@ -0,0 +1,20 @@ +# PMC Helper Model Checkpoints + +These checkpoints contain helper models used in creating the PMC-2M dataset. + +## Download Weights + +Make sure to run this script before using the pipeline. + +```python +from huggingface_hub import snapshot_download + +weights_dir = snapshot_download( + repo_id="vector-institute/pmc-helper-models", + local_dir="openpmcvl/granular/checkpoints", + allow_patterns=["*.pt", "*.pth"] +) +``` + +The weights will be downloaded to the specified `local_dir`. Your existing code can then load them from this location. +Change the `local_dir` to the path of the directory leading to `openpmcvl/granular/checkpoints` in your project.