msiron commited on
Commit
a0bb336
·
1 Parent(s): 137bc98

add hf token from env variable

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -9,8 +9,10 @@ from pymatgen.core.composition import Composition
9
  from pymatgen.entries.computed_entries import (ComputedStructureEntry,
10
  GibbsComputedStructureEntry)
11
 
 
 
12
  # Load only the train split of the dataset
13
- dataset = load_dataset("LeMaterial/leDataset", split="train")
14
 
15
  # Convert the train split to a pandas DataFrame
16
  train_df = dataset.to_pandas()
 
9
  from pymatgen.entries.computed_entries import (ComputedStructureEntry,
10
  GibbsComputedStructureEntry)
11
 
12
+ HF_TOKEN = os.environ.get("HF_TOKEN")
13
+
14
  # Load only the train split of the dataset
15
+ dataset = load_dataset("LeMaterial/leDataset", token=HF_TOKEN, split="train")
16
 
17
  # Convert the train split to a pandas DataFrame
18
  train_df = dataset.to_pandas()