jordancaraballo commited on
Commit
0edf1f6
·
1 Parent(s): b6db88e

Working on the deployment of HF, fixing bug in the tqdm app

Browse files
Dockerfile CHANGED
@@ -1,6 +1,7 @@
1
  FROM python:3.11-slim-bullseye
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
 
4
 
5
  RUN rm -rf /etc/apt/sources.list.d/*.list && \
6
  apt-get update && apt-get install -y git gcc build-essential python3-dev libgeos-dev
 
1
  FROM python:3.11-slim-bullseye
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV HF_HUB_DISABLE_PROGRESS_BARS=1
5
 
6
  RUN rm -rf /etc/apt/sources.list.d/*.list && \
7
  apt-get update && apt-get install -y git gcc build-essential python3-dev libgeos-dev
pages/pages/1_⚡_Alaskan_Tundra_Lightning.py CHANGED
@@ -14,17 +14,22 @@ import pandas as pd
14
  from glob import glob
15
  from pathlib import Path
16
  from datetime import datetime
17
- from huggingface_hub import snapshot_download
18
 
19
  # define dataset url
20
  DATASET_URL = 'jordancaraballo/alaska-wildfire-occurrence'
21
  EPSG = 3338
22
 
23
  # Grab the dataset from Hugging Face
24
- cgl_dataset_dir = snapshot_download(repo_id=DATASET_URL, allow_patterns="*.tif", repo_type='dataset')
25
- cgl_filename = glob(os.path.join(cgl_dataset_dir, 'alaskan-tundra-lightning-forecast_latest.tif'))[0]
26
 
27
- print(cgl_dataset_dir)
 
 
 
 
 
28
 
29
  # Open the filename from the forecast
30
  cgl_ds = rxr.open_rasterio(cgl_filename)
 
14
  from glob import glob
15
  from pathlib import Path
16
  from datetime import datetime
17
+ from huggingface_hub import snapshot_download, hf_hub_download
18
 
19
  # define dataset url
20
  DATASET_URL = 'jordancaraballo/alaska-wildfire-occurrence'
21
  EPSG = 3338
22
 
23
  # Grab the dataset from Hugging Face
24
+ #cgl_dataset_dir = snapshot_download(repo_id=DATASET_URL, allow_patterns="*.tif", repo_type='dataset')
25
+ #cgl_filename = glob(os.path.join(cgl_dataset_dir, 'alaskan-tundra-lightning-forecast_latest.tif'))[0]
26
 
27
+ cgl_filename = hf_hub_download(
28
+ repo_id=DATASET_URL,
29
+ filename='alaskan-tundra-lightning-forecast_latest.tif',
30
+ repo_type="dataset")
31
+
32
+ #print(cgl_dataset_dir)
33
 
34
  # Open the filename from the forecast
35
  cgl_ds = rxr.open_rasterio(cgl_filename)