guapaQAQ commited on
Commit
786c853
·
1 Parent(s): be1ce11

Update README

Browse files
Files changed (1) hide show
  1. README.md +12 -8
README.md CHANGED
@@ -74,26 +74,30 @@ gametime/basic/
74
 
75
  You can download and unzip:
76
 
77
- ```bash
78
  # pip install -U huggingface_hub
79
  import os
80
  from huggingface_hub import hf_hub_download
 
 
 
 
 
81
 
82
- # 你的 token:優先用環境變數,沒有就直接字串
83
  token = os.getenv("HF_TOKEN") or "<YOUR_HF_TOKEN>"
84
 
85
- # 注意 filename 必須是 repo 裡的「相對路徑」
86
- # 你剛才的 ZIP 是放在資料集倉庫的:gametime/download/gametime_basic_v1.zip
87
- # 如果不確定,先看第 2 步「列出檔案」確認實際路徑
88
  path = hf_hub_download(
89
  repo_id="gametime-benchmark/gametime",
90
  repo_type="dataset",
91
- filename="gametime/download/gametime_basic_v1.zip", # <- 路徑要對
92
- revision="main", # 或指定 commit sha
93
  token=token,
94
- local_dir=".", # 下載到目前目錄
95
  )
96
  print("saved to:", path)
 
 
 
97
  unzip gametime_basic_v1.zip
98
  ```
99
 
 
74
 
75
  You can download and unzip:
76
 
77
+ ```python
78
  # pip install -U huggingface_hub
79
  import os
80
  from huggingface_hub import hf_hub_download
81
+ try:
82
+ import dotenv
83
+ dotenv.load_dotenv() # Load .env if available
84
+ except:
85
+ print("dotenv not installed, skipping .env loading")
86
 
 
87
  token = os.getenv("HF_TOKEN") or "<YOUR_HF_TOKEN>"
88
 
 
 
 
89
  path = hf_hub_download(
90
  repo_id="gametime-benchmark/gametime",
91
  repo_type="dataset",
92
+ filename="download/gametime_basic_v1.zip",
93
+ revision="main",
94
  token=token,
95
+ local_dir=".", # download to current directory (change as needed)
96
  )
97
  print("saved to:", path)
98
+ ```
99
+
100
+ ```bash
101
  unzip gametime_basic_v1.zip
102
  ```
103