Spaces:
Sleeping
Sleeping
Download src/envs.py from aurigin/Hackathon_Truth_Vs_Machine: direct link, hf CLI and curl.
- Browser
- Download file 754 Bytes
-
https://huggingface.co/spaces/aurigin/Hackathon_Truth_Vs_Machine/resolve/main/src/envs.py
- Command line
-
hf download hf://spaces/aurigin/Hackathon_Truth_Vs_Machine/src/envs.py
-
curl -L -o envs.py https://huggingface.co/spaces/aurigin/Hackathon_Truth_Vs_Machine/resolve/main/src/envs.py
754 Bytes
| import os | |
| from huggingface_hub import HfApi | |
| # Info to change for your repository | |
| # ---------------------------------- | |
| TOKEN = os.environ.get("HF_TOKEN") # A read/write token for your org | |
| OWNER = "aurigin" | |
| # ---------------------------------- | |
| REPO_ID = f"{OWNER}/Hackathon_Truth_Vs_Machine" | |
| TEAMS_REPO = f"{OWNER}/TVM_teams" | |
| SUBMISSIONS_REPO = f"{OWNER}/TVM_submissions" | |
| TRUE_LABELS_REPO = os.environ.get("TRUE_LABELS_REPO", f"{OWNER}/TVM_true-labels") | |
| # If you setup a cache later, just change HF_HOME | |
| CACHE_PATH = os.getenv("HF_HOME", ".") | |
| # Local caches | |
| TEAMS_PATH = os.path.join(CACHE_PATH, "teams") | |
| SUBMISSIONS_PATH = os.path.join(CACHE_PATH, "submissions") | |
| TRUE_LABELS_PATH = os.path.join(CACHE_PATH, "true-labels") | |
| API = HfApi(token=TOKEN) | |