|
import os |
|
from pathlib import Path |
|
from huggingface_hub import HfApi |
|
|
|
|
|
try: |
|
from dotenv import load_dotenv |
|
|
|
env_path = Path(__file__).parent.parent.parent / ".env" |
|
if env_path.exists(): |
|
load_dotenv(env_path) |
|
print(f"Loaded .env from: {env_path}") |
|
else: |
|
|
|
load_dotenv() |
|
print("Loaded .env from current directory") |
|
except ImportError: |
|
print("python-dotenv not available, using system environment only") |
|
|
|
|
|
HF_TOKEN = os.environ.get("HF_TOKEN") |
|
HF_ORGANIZATION = "mideind" |
|
|
|
|
|
if HF_TOKEN: |
|
print(f"HF_TOKEN loaded: {HF_TOKEN[:10]}...") |
|
else: |
|
print("HF_TOKEN not found in environment") |
|
|
|
|
|
REPO_ID = f"{HF_ORGANIZATION}/icelandic-llm-leaderboard" |
|
QUEUE_REPO = f"{HF_ORGANIZATION}/icelandic-llm-leaderboard-requests" |
|
RESULTS_REPO = f"{HF_ORGANIZATION}/icelandic-llm-leaderboard-results" |
|
|
|
|
|
HF_HOME = os.getenv("HF_HOME", ".") |
|
EVAL_REQUESTS_PATH = os.path.join(HF_HOME, "eval-queue") |
|
EVAL_RESULTS_PATH = os.path.join(HF_HOME, "eval-results") |
|
|
|
|
|
API = HfApi(token=HF_TOKEN) |