vshulev commited on
Commit
b6a953e
·
1 Parent(s): 39f7fe9

Download ecolayers from HF dataset

Browse files
annual_mean_air_temp.tif DELETED

Git LFS Details

  • SHA256: f584314e12be7cd63d0e2292f4655173030e3e547ce36a2a97ecbdabc4f87a53
  • Pointer size: 134 Bytes
  • Size of remote file: 115 MB
annual_precipitation.tif DELETED

Git LFS Details

  • SHA256: 070c2309ead1ae703652e87f1ca51ba390c9ddfd9a236944528ae8b1c53a4e9a
  • Pointer size: 134 Bytes
  • Size of remote file: 655 MB
app.py CHANGED
@@ -12,13 +12,22 @@ from sklearn.preprocessing import LabelEncoder
12
  import torch
13
  from torch import nn
14
  from transformers import BertConfig, BertForMaskedLM, PreTrainedTokenizerFast
15
- from huggingface_hub import PyTorchModelHubMixin
16
  from pinecone import Pinecone
17
  import rasterio
18
  from rasterio.sample import sample_gen
19
 
20
  from config import DEFAULT_INPUTS, MODELS, DATASETS, ID_TO_GENUS_MAP, LAYER_NAMES
21
 
 
 
 
 
 
 
 
 
 
22
  # We need this for the eco layers because they are too big
23
  PIL.Image.MAX_IMAGE_PIXELS = None
24
 
 
12
  import torch
13
  from torch import nn
14
  from transformers import BertConfig, BertForMaskedLM, PreTrainedTokenizerFast
15
+ from huggingface_hub import PyTorchModelHubMixin, hf_hub_download
16
  from pinecone import Pinecone
17
  import rasterio
18
  from rasterio.sample import sample_gen
19
 
20
  from config import DEFAULT_INPUTS, MODELS, DATASETS, ID_TO_GENUS_MAP, LAYER_NAMES
21
 
22
+ # Download ecolayers from HF dataset
23
+ for image_name in LAYER_NAMES:
24
+ hf_hub_download(
25
+ repo_id="LofiAmazon/Global-Ecolayers",
26
+ filename=image_name,
27
+ repo_type="dataset",
28
+ local_dir=".",
29
+ )
30
+
31
  # We need this for the eco layers because they are too big
32
  PIL.Image.MAX_IMAGE_PIXELS = None
33
 
human_footprint.tiff DELETED

Git LFS Details

  • SHA256: 8189a86707c91f1cc8101c3f95d827351166f9f79a92e91569320bd48e542a9d
  • Pointer size: 135 Bytes
  • Size of remote file: 3.75 GB
median_elevation_1km.tiff DELETED

Git LFS Details

  • SHA256: 95fed346b8bb25ca67c59b9d8c8e110f4856eb51401e5cc0011b73cba7e3e02b
  • Pointer size: 134 Bytes
  • Size of remote file: 397 MB
population_density_1km.tif DELETED

Git LFS Details

  • SHA256: b088b073176fdb9e4170bc553c1876e1a010451c541be20cf83609143aed2522
  • Pointer size: 134 Bytes
  • Size of remote file: 263 MB
precipitation_seasonality.tif DELETED

Git LFS Details

  • SHA256: 1c45e31b3204be33a3005723163b9d84bda96f5152e9b1c629e6cae72ce011bd
  • Pointer size: 134 Bytes
  • Size of remote file: 188 MB
temp_seasonality.tif DELETED

Git LFS Details

  • SHA256: 771b1037b33d46800608a96bd12c569755447aa0b8762a8a731fbc06a4f6125e
  • Pointer size: 134 Bytes
  • Size of remote file: 457 MB