shermansiu commited on
Commit
384c2c5
1 Parent(s): a613b2a

Update usage.

Browse files
Files changed (1) hide show
  1. README.md +1 -11
README.md CHANGED
@@ -58,22 +58,12 @@ ECMWF data products are subject to the following terms:
58
  Use the Huggingface Hub file system to load files. The `datasets` library doesn't support netCDF files yet.
59
 
60
  ```python
61
- from huggingface_hub import HfFileSystem
62
  import xarray
63
 
64
  fs = HfFileSystem()
65
 
66
  files = fs.ls("datasets/shermansiu/dm_graphcast_datasets/dataset", detail=False)
67
-
68
- with fs.open(files[0], "rb") as f:
69
- example_batch = xarray.load_dataset(f).compute()
70
- ```
71
-
72
- Alternatively, if you want a local copy, you can run this (downloaded files will not be re-downloaded unless instructed to otherwise):
73
-
74
- ```python
75
- from huggingface_hub import hf_hub_download
76
-
77
  local_file: str = hf_hub_download(repo_id="shermansiu/dm_graphcast_datasets", filename=f"dataset/{files[0]}", repo_type="dataset")
78
 
79
  with open(local_file, "rb") as f:
 
58
  Use the Huggingface Hub file system to load files. The `datasets` library doesn't support netCDF files yet.
59
 
60
  ```python
61
+ from huggingface_hub import HfFileSystem, hf_hub_download
62
  import xarray
63
 
64
  fs = HfFileSystem()
65
 
66
  files = fs.ls("datasets/shermansiu/dm_graphcast_datasets/dataset", detail=False)
 
 
 
 
 
 
 
 
 
 
67
  local_file: str = hf_hub_download(repo_id="shermansiu/dm_graphcast_datasets", filename=f"dataset/{files[0]}", repo_type="dataset")
68
 
69
  with open(local_file, "rb") as f: