Nyanpre commited on
Commit
eef6d27
·
verified ·
1 Parent(s): 7952b83

Update apppp.txt

Browse files
Files changed (1) hide show
  1. apppp.txt +3 -3
apppp.txt CHANGED
@@ -8,7 +8,7 @@ from huggingface_hub import CommitScheduler
8
 
9
  # --- ① 統計データ保存用の設定 ---
10
  # 自分のリポジトリ名に合わせて変更、または環境変数から取得
11
- DATASET_REPO_ID = "your-username/hasunosora-stats"
12
  DATA_FILE = Path("data") / "stats.json"
13
  DATA_FILE.parent.mkdir(parents=True, exist_ok=True)
14
 
@@ -18,13 +18,13 @@ if not DATA_FILE.exists():
18
  json.dump({"total": 0, "history": []}, f)
19
 
20
  # Hugging Face Datasetへ自動保存するスケジューラー
21
- # ※SpaceのSettingsで HF_TOKEN (write権限) の設定が必要です
22
  scheduler = CommitScheduler(
23
  repo_id=DATASET_REPO_ID,
24
  repo_type="dataset",
25
  folder_path=DATA_FILE.parent,
26
  path_in_repo="stats.json",
27
- token=os.getenv("HF_TOKEN")
28
  )
29
 
30
  def load_stats():
 
8
 
9
  # --- ① 統計データ保存用の設定 ---
10
  # 自分のリポジトリ名に合わせて変更、または環境変数から取得
11
+ DATASET_REPO_ID = "Nyanpre/hasunosora-stats"
12
  DATA_FILE = Path("data") / "stats.json"
13
  DATA_FILE.parent.mkdir(parents=True, exist_ok=True)
14
 
 
18
  json.dump({"total": 0, "history": []}, f)
19
 
20
  # Hugging Face Datasetへ自動保存するスケジューラー
21
+ # ※SpaceのSettingsでCP_ORACLE_TOKEN (write権限) の設定が必要です
22
  scheduler = CommitScheduler(
23
  repo_id=DATASET_REPO_ID,
24
  repo_type="dataset",
25
  folder_path=DATA_FILE.parent,
26
  path_in_repo="stats.json",
27
+ token=os.getenv("CP_ORACLE_TOKEN")
28
  )
29
 
30
  def load_stats():