confia-backend / init.py
elsamueldev's picture
fix: validar la variable de entorno HF_TOKEN antes de iniciar sesi贸n
a7219e0
raw
history blame
356 Bytes
import os
from huggingface_hub import login, snapshot_download
HF_TOKEN = os.getenv("HF_TOKEN")
if HF_TOKEN is None:
raise RuntimeError("HF_TOKEN is not set")
CODE_REPO_ID = "elsamueldev/confia-backend-code"
login(HF_TOKEN)
snapshot_download(
repo_id=CODE_REPO_ID,
repo_type="dataset",
local_dir=".",
local_dir_use_symlinks=False
)