shermansiu commited on
Commit
db3865a
1 Parent(s): 3b068a7

Add README.

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md CHANGED
@@ -13,6 +13,27 @@ The model weights are released by Google DeepMind.
13
 
14
  The model weights are made available for use under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may obtain a copy of the License at: https://creativecommons.org/licenses/by-nc-sa/4.0/.
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ## Citation
17
  - Paper: https://www.science.org/doi/10.1126/science.adi2336
18
  - Preprint: https://arxiv.org/abs/2212.12794
 
13
 
14
  The model weights are made available for use under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may obtain a copy of the License at: https://creativecommons.org/licenses/by-nc-sa/4.0/.
15
 
16
+ ## Usage
17
+
18
+ You can load the model like so:
19
+
20
+ ```python
21
+ from graphcast import checkpoint
22
+
23
+ REPO_ID = "shermansiu/dm_graphcast"
24
+ FILENAME = ""
25
+
26
+ with open(hf_hub_download(repo_id=REPO_ID, filename=FILENAME), "rb") as f:
27
+ ckpt = checkpoint.load(f, graphcast.CheckPoint)
28
+ params = ckpt.params
29
+ state = {}
30
+
31
+ model_config = ckpt.model_config
32
+ task_config = ckpt.task_config
33
+ ```
34
+
35
+ For more details, check out https://github.com/shermansiu/graphcast/blob/main/graphcast_demo_hf.ipynb
36
+
37
  ## Citation
38
  - Paper: https://www.science.org/doi/10.1126/science.adi2336
39
  - Preprint: https://arxiv.org/abs/2212.12794