From 8c2fa3e1c03833f8860e9260b50a03b85b36f142 Mon Sep 17 00:00:00 2001 From: Laure Vancau Date: Sat, 21 Dec 2024 14:14:56 +0100 Subject: [PATCH] feat: using space secret --- src/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index b6dc50f..21de299 100644 --- a/src/main.py +++ b/src/main.py @@ -100,7 +100,9 @@ def push_observation(tab_log:DeltaGenerator=None): tab_log.info(f"Uploading observation: {metadata_str}") # get huggingface api - api = HfApi() + import os + token = os.getenv("HF_TOKEN") + api = HfApi(token=token) f = tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) f.write(metadata_str)