Commit
Β·
58ac12b
1
Parent(s):
f5ac567
Rename token
Browse files
app.py
CHANGED
|
@@ -3,14 +3,15 @@ import os
|
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
# pull files from hub
|
|
|
|
| 6 |
yaml_file_path = hf_hub_download(repo_id="ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL",
|
| 7 |
-
filename="Prithvi_EO_V2_300M_TL_config.yaml", token=
|
| 8 |
checkpoint = hf_hub_download(repo_id="ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL",
|
| 9 |
-
filename='Prithvi_EO_V2_300M_TL.pt', token=
|
| 10 |
model_def = hf_hub_download(repo_id="ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL",
|
| 11 |
-
filename='prithvi_mae.py', token=
|
| 12 |
model_inference = hf_hub_download(repo_id="ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL",
|
| 13 |
-
filename='inference.py', token=
|
| 14 |
os.system(f'cp {model_def} .')
|
| 15 |
os.system(f'cp {model_inference} .')
|
| 16 |
|
|
|
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
# pull files from hub
|
| 6 |
+
token = os.environ.get("HF_TOKEN", None)
|
| 7 |
yaml_file_path = hf_hub_download(repo_id="ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL",
|
| 8 |
+
filename="Prithvi_EO_V2_300M_TL_config.yaml", token=token)
|
| 9 |
checkpoint = hf_hub_download(repo_id="ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL",
|
| 10 |
+
filename='Prithvi_EO_V2_300M_TL.pt', token=token)
|
| 11 |
model_def = hf_hub_download(repo_id="ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL",
|
| 12 |
+
filename='prithvi_mae.py', token=token)
|
| 13 |
model_inference = hf_hub_download(repo_id="ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL",
|
| 14 |
+
filename='inference.py', token=token)
|
| 15 |
os.system(f'cp {model_def} .')
|
| 16 |
os.system(f'cp {model_inference} .')
|
| 17 |
|